Repository navigation
Testing Standards
github-actions[bot] edited this page Oct 13, 2026
·
3 revisions
Canonical source:
testing/README.md— this page is rendered from it on every publish; edit the source.
The prescriptive testing standards for the ClawAI monorepo (21 NestJS services +
Next.js frontend + 6 shared packages). These documents say what good testing is
here; the why (post-mortem lessons) lives in
../memory/testing-strategy.md.
| Layer | Runner | Notes |
|---|---|---|
| Backend unit/integration | Vitest (swc) |
*.spec.ts co-located in __tests__/
|
| Frontend unit/component | Vitest |
*.test.ts / *.spec.ts
|
| End-to-end (browser) | Playwright | user journeys through the real UI |
Every workspace runs Vitest (vitest run); Playwright stays for E2E. Jest was
removed from all workspaces on 2026-09-17 (ADR-099, superseding ADR-062).
- Risk-based test design, not count quotas. Design tests from the risk surface of the unit. The old "20–25 API variations per endpoint" quota is an anti-pattern — it rewards padding and misses the one dangerous branch. See testing-strategy.
- Coverage proportional to blast radius. Global ≥95% statements/lines/functions, ≥90% branches; 100% branch on pure critical logic (schemas, mappers, permission/ ownership decisions, query-key builders, event validators). See coverage-policy.
- TDD by default. Write the failing test before the implementation.
- Defense in depth. Each layer catches a different bug class; green unit gates are necessary, not sufficient.
- Verify persistence and logs, not just responses. A 2xx is not proof.
ClawAI Wiki · source-controlled under wiki/ · generated/mirrored from the current repository knowledge layer.
ClawAI Wiki
Product
- Product-Vision
- Flagship-Features
- Business-Overview
- Requirements-Register
- Drift-Log
- Runtime-Managed-Connector-Providers
- Threads
- ADR-Index
Architecture
- System-at-a-Glance
- Architecture-Map
- System-Architecture
- Message-Flow
- End-to-End-Data-Flow
- Routing-Engine
- Event-Bus
- Security-Architecture
Platform
- Backend-Services
- Frontend-Architecture
- Shared-Packages
- Database-Reference
- API-Reference
- Provider-Catalog
- Memory-and-Context-Architecture
- File-Support-Architecture
- Research-and-Web-Crawling
Runtime & Ops
- Docker-Guide
- Nginx-Reference
- CI-CD-Pipeline
- Logging-and-Observability
- Operational-Runbooks
- Troubleshooting
Quality
Engineering OS
- AI-Native-Engineering-OS
- Generated-Manifests
- Rules-Catalog
- Skills-Catalog
- Context-Layer
- Engineering-Memory
- Tooling-and-Automation
- Scripts-and-Operations
- ESLint-and-Architecture-Enforcement
- Extended-Work-Skills
Agents
Reference