Testing architecture
Vitest projects, Playwright, and what to test where.
Layers
| Layer | Tool | Target |
|---|---|---|
| Unit | Vitest | Pure utils, mappers, filters, parsers |
| Component | Vitest + Testing Library | DataTable, admin cells, dialogs |
| Integration | Vitest | API routes, module edges with fakes |
| E2E | Playwright | Critical journeys (smoke + PR) |
Conventions
- Colocate
__test__next to the unit under test - Prefer fakes over hitting real Neon in unit tests
- Keep 100% coverage gates green — expand tests with features, don’t lower thresholds
- See Tooling → Testing / Playwright