Testing Guide
Static UI uses Vitest for unit tests and Playwright for E2E tests.
Test Stack
- Vitest — Unit and integration tests
- @vitest/coverage-v8 — Code coverage reporting
- Playwright — End-to-end browser tests
Running Tests
Bash
Test Locations
packages/cli/tests/— CLI command testspackages/core/tests/— Core utility testspackages/registry/tests/— Registry validation testse2e/— Playwright E2E specs
Coverage Targets
- Lines: 80%+
- Functions: 80%+
- Branches: 75%+
- Statements: 80%+
Writing Tests
Tests use Vitest globals API with describe/it blocks:
TypeScript
E2E Tests
Playwright tests cover critical user journeys across Chromium, Firefox, and mobile viewports. Tests run against the development server.