What problem does it solve?
Defines and enforces consistent testing practices to improve reliability, readability, and maintainability of software by preventing flaky tests and unclear test intent.
Core Features & Use Cases
- Structure: colocate tests with their source files; for frontend, extract logic into a separate logic file and test it with Bun. Use Playwright for browser-specific behavior: authentication redirects, route guards, uploads/downloads, keyboard focus, drag-and-drop, and viewer/editor flows. Structural invariant tests (auth enforcement, branded types) belong in apps/api/src/tests/security/.
- Rules: Use plain fakes over heavy mocks, describe by behaviour, avoid shared mutable state, ensure deterministic setup, and require regression tests for bug fixes.
- Guidance: Emphasizes tenant isolation checks at the highest meaningful layer and explicit, isolated test fixtures to improve reliability.
Quick Start
Run tests using the conventions to ensure consistent, reliable results.