yarn test:unit
yarn test:unit:coverage
Open the link is shown on the terminal, click on right up side "%Coverage" and check it.
End-to-end tests are created using Playwright. To run the tests:
yarn test:e2e
It will run e2e code coverage command on next-app:
yarn test:e2e:coverage
yarn nyc:report
Open html generated report on browser:
./test-coverage/e2e/index.html
Project relies on Happo as a visual regression tool. You need to have Happo api keys if you want to use them. Add to your global environment variables on your next-app or on your local machine.
HAPPO_API_KEY=XXX
HAPPO_API_SECRET=XXX
It will run happo tests commands on next-app:
yarn install && yarn build
yarn happo run
You can compare runs between two commit hashes with:
yarn happo compare first-commit-hash second-commit-hash
You can run by test component with:
yarn happo run --only component-name
Basic A11y tests are in place at test/e2e/a11y.e2e.test.ts
Make sure to keep it up to date, covering any new pages, dialogs, collapsable menus, etc.