Tests
Vitest - Component Tests
To run component tests, run the script pnpm run dev
in one terminal and run pnpm test in a separate terminal.
Run the script pnpm test:coverage to generate a vitest test
coverage report from v8.
We can provide more custom coverage reports or providers using the
vitest guide.
Accessibility tests
To run accessibility tests locally, run the script pnpm run dev
in one terminal and run pnpm integration:wcag in a separate terminal.
Playwright - E2E Tests
Run using the Terminal
To run E2E tests via the terminal, run 'pnpm intergration' for a quicker, but limited test run. Run 'pnpm integration:all' to run all playwright tests (including the accessibility tests).
Run using VSCode Playwright Extension
For a more user-friendly GUI or for more in-depth playwright options within VSCode, download the Playwright Extension.
This will allow you to select specific browsers (or projects), run individual tests and/or tests suites, and allow for better debugging, among other advantages. Using the trace viewer can help to debugging playwright tests.