testing-best-practices
Installation
SKILL.md
Testing Best Practices
Choose the right test type, isolate data per suite, and run against a disposable Neon branch.
Prerequisites
Complete these setup recipes first:
- Browser Tests with Playwright
- Integration Tests
- Unit Tests with Bun
Choosing a Test Type
Ask "how would a user verify this works?" and pick the highest applicable tier:
- Playwright (default) — UI interactions, visual feedback, form validation, multi-step flows, protected routes, accessibility.
- Integration — API responses (status, JSON shape), DB state after operations, server logic without UI, or when Playwright is too slow/complex.
- Unit — pure functions with complex logic, many edge cases, or type narrowing/assertions with no external dependencies.