Testing
TBD. Detailed testing strategy and conventions will live here.
In the meantime, the project’s testing rules are documented in the repo-root CLAUDE.md. Key points:
- Vitest runs against a real Postgres (
docker compose up -d postgreslocally; service container in CI). fileParallelism: false— tests share the pool and serialise to avoid tenant-context interference.- Tests connect as
mcp_app(RLS enforced); a separateadminClienthandles setup/cleanup. - Mock external API boundaries (
fetch,google-ads-api) only — never mock the DB, crypto, or audit log. - The RLS test
tests/integration/rls.test.tsis a hard gate.
A consolidated testing guide (writing new tests, running specific suites, debugging flaky-pool issues) will live in this section.