nextly-template
nextly-template copied to clipboard
test: add unit tests generated by ToTheos
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 configtest: add src/types.test.tstest: add src/app/page.test.tsxtest: add src/app/layout.test.tsxtest: add src/components/Container.test.tsxtest: add src/components/Hero.test.tsxtest: add src/components/Testimonials.test.tsxtest: add src/components/Cta.test.tsxtest: add src/components/data.test.jstest: add src/components/Benefits.test.tsxtest: add src/components/Faq.test.tsxtest: add src/components/DarkSwitch.test.tsxtest: add src/components/DisclosureClient.test.tsxtest: add src/components/Video.test.tsxtest: add src/components/Navbar.test.tsxtest: add src/components/PopupWidget.test.tsxtest: add src/components/SectionTitle.test.tsxtest: add src/components/Footer.test.tsx
How to run tests
Jestis included as a dev dependency.Run tests directly
./node_modules/.bin/jestOptional: 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 testRun tests in watch mode during development:
yarn test:watchRun 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.
Someone is attempting to deploy a commit to the Web3templates Team on Vercel.
A member of the Team first needs to authorize it.