testing
Testing
All testing guidance lives in this directory. Read the relevant file for your task:
| Type | File | When to use |
|---|---|---|
| Unit tests | unit.md | Framework setup, mocks, colocated tests |
| Writing tests | write-tests.md | What to test, what to skip, workflow |
| LLM tests | llm.md | Tests that call real LLMs (pnpm test-ai) |
| Eval suite | eval.md | Cross-model comparison, LLM-as-judge |
| Integration | integration.md | Emulator-backed tests (pnpm test-integration) |
| E2E tests | e2e.md | Real email workflow tests from inbox-zero-e2e repo |
Prefer behavior-focused assertions; avoid freezing prompt copy or internal call shapes unless those exact values are the contract under test.
Quick Commands
pnpm test -- path/to/file.test.ts # Single unit test
pnpm test --run # All unit tests
pnpm test-integration # Integration tests (emulator)
pnpm test-ai your-feature # AI test (real LLM)
EVAL_MODELS=all pnpm test-ai eval/your-feature # Eval across models
More from elie222/inbox-zero
ui-components
UI component and styling guidelines using Shadcn UI, Radix UI, and Tailwind
76security
Security guidelines for API route development
36fullstack-workflow
Complete fullstack workflow combining GET API routes, server actions, SWR data fetching, and form handling. Use when building features that need both data fetching and mutations from API to UI.
21project-structure
Project structure and file organization guidelines
20test-feature
End-to-end feature testing — browser QA, API verification, eval tests, or any combination. Covers browser interactions (via agent-browser CLI), Google Workspace operations (gws CLI), API calls, and LLM eval tests. Can also persist tests as reusable QA flows or eval files.
20explain-changes
Explain recent changes and provide a structured summary with security checks
20