Testing Strategy
Layers
| Layer | Tool | Scope |
|---|---|---|
| Go unit tests | go test | Service logic, handlers |
| Go integration tests | go test + testcontainers | DB queries, Temporal workflows |
| TypeScript unit tests | Vitest | React components, hooks, utilities |
| E2E tests | Playwright | Critical user flows |
Principles
- Test behavior, not implementation details
- Use table-driven tests in Go
- Mock external services at the boundary (HTTP client, Temporal client)
- Integration tests use real Postgres via testcontainers
- E2E tests cover critical paths: auth, core CRUD, real-time updates