writing-tests
Installation
SKILL.md
Writing Tests
Test behavior, not implementation. Prioritize by risk.
When to Use Each Type
| Type | What | When | Tools |
|---|---|---|---|
| Unit | Single function/hook | Pure logic, calculations | Vitest, Jest |
| Integration | Component + deps | Forms, data display | Testing Library |
| E2E | Full user flow | Critical paths | Playwright |
Always Test
- Auth flows
- Payment/checkout
- Data mutations (create, update, delete)
- Authorization rules
- Critical business logic