---
title: Testing
description: Unit, fleet, and E2E expectations for the monorepo.
---

Canonical detail lives in the repo (`AGENTS.md` testing rules and `docs/runbooks/`); this page keeps the essentials.

## Defaults

- **Vitest** for unit/integration — in-process pglite via `@blinqx/db/testing` (no Docker required for package tests).
- **Mocks only** for external providers in tests — never hit live APIs.
- **Playwright** E2E needs Docker Postgres and a real provisioned demo tenant.
- **Fleet** — `pnpm test:fleet` proves multi-tenant isolation through PgBouncer (CI integration job).

## Commands

```bash
pnpm test
pnpm test:fleet
pnpm e2e
pnpm --filter @blinqx/api-contract test
pnpm --filter @blinqx/docs build
```

## Docs / OpenAPI gates

- `scripts/check-openapi.mjs` — live smoke: OpenAPI 3.x + required paths + `bearerAuth`
- Contract vitest — offline path coverage and generated-artifact drift
- Docs Pages workflow — symlink integrity + `dist/openapi.json` present

Acceptance criteria on Linear issues become automated tests before an issue counts as done.
