Deep DivesWeb
Testing
Testing guide for the RawStack Web component.
The Web app has two main levels of testing. As a general rule, Vitest should cover components, hooks, and utilities, while Playwright should cover complete browser-based user flows through the application.
Unit tests
Component and utility tests run with Vitest.
npm run test
npm run test:runConfiguration: vitest.config.ts.
E2E tests
Browser automation tests run with Playwright.
npm run test:e2ePlaywright tests require both the API and the Web dev server to be running.
Coverage
To generate a coverage report from the Vitest suite:
npm run test:run -- --coverageCoverage output is written to coverage/.