# Testing

> Guidelines for testing the application with Vitest, including unit tests, integration tests (emulator), AI tests, and eval suites for LLM features

- Skill: `mahabdalla/testing-3` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mahabdalla/testing-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mahabdalla/testing-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: mahabdalla (https://skillmd.com/u/mahabdalla)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/mahabdalla/testing-3

---

# Testing

All testing guidance lives in this directory. Read the relevant file for your task:

| Type | File | When to use |
|------|------|-------------|
| Unit tests | [unit.md](unit.md) | Framework setup, mocks, colocated tests |
| Writing tests | [write-tests.md](write-tests.md) | What to test, what to skip, workflow |
| LLM tests | [llm.md](llm.md) | Tests that call real LLMs (`pnpm test-ai`) |
| Eval suite | [eval.md](eval.md) | Cross-model comparison, LLM-as-judge |
| Integration | [integration.md](integration.md) | Emulator-backed tests (`pnpm test-integration`) |
| E2E tests | [e2e.md](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

```bash
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
```

---
> Converted and distributed by [TomeVault](https://tomevault.io) | [Claim this content](https://tomevault.io/claim/elie222/inbox-zero)

