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:run

Configuration: vitest.config.ts.

E2E tests

Browser automation tests run with Playwright.

npm run test:e2e

Playwright 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 -- --coverage

Coverage output is written to coverage/.