nextly-template icon indicating copy to clipboard operation
nextly-template copied to clipboard

test: add unit tests generated by ToTheos

Open ToTheos-Dev opened this issue 6 months ago • 1 comments

AI-Generated Unit Tests

This PR adds AI-generated unit tests to improve coverage and ensure key functionality is tested.

Test coverage summary
Statements : 100% ( 2/2 )
Branches   : 100% ( 0/0 )
Functions  : 100% ( 0/0 )
Lines      : 100% ( 2/2 )

Coverage metrics generated by Jest, an open-source JavaScript testing framework.
Test files and commits
  • test: add config
  • test: add src/types.test.ts
  • test: add src/app/page.test.tsx
  • test: add src/app/layout.test.tsx
  • test: add src/components/Container.test.tsx
  • test: add src/components/Hero.test.tsx
  • test: add src/components/Testimonials.test.tsx
  • test: add src/components/Cta.test.tsx
  • test: add src/components/data.test.js
  • test: add src/components/Benefits.test.tsx
  • test: add src/components/Faq.test.tsx
  • test: add src/components/DarkSwitch.test.tsx
  • test: add src/components/DisclosureClient.test.tsx
  • test: add src/components/Video.test.tsx
  • test: add src/components/Navbar.test.tsx
  • test: add src/components/PopupWidget.test.tsx
  • test: add src/components/SectionTitle.test.tsx
  • test: add src/components/Footer.test.tsx
How to run tests

Jest is included as a dev dependency.

Run tests directly

./node_modules/.bin/jest

Optional: add npm scripts

You can add convenient scripts to package.json:

{
  "scripts": {
    "test": "jest",
    "test:watch": "jest --watch",
    "test:coverage": "jest --coverage --coverageReporters=text-summary"
  }
}

Usage examples

Run tests once:

yarn test

Run tests in watch mode during development:

yarn test:watch

Run tests with coverage summary:

yarn test:coverage

This contribution was created with assistance from ToTheos (https://totheos.com) to support test generation, code refactoring, and pull request preparation for an open-source codebases.

The tool was used to automate routine software development tasks.

ToTheos-Dev avatar May 19 '26 12:05 ToTheos-Dev

Someone is attempting to deploy a commit to the Web3templates Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 19 '26 12:05 vercel[bot]