docs(adr): ADR-011 TDD foundation; update AGENTS.md per-feature
Captures the decision to add @repo/core-testing, factories, contract suites, vitest safety defaults, coverage thresholds, Storybook test-runner, and CI as one cohesive TDD foundation. Per-feature AGENTS.md gains a Tests section pointing to factories, contract suite, and the canonical test commands. Spec: §7.4, §7.5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,18 @@ beforeEach(() => {
|
||||
- **Alias** — `@/` resolves to `src/`
|
||||
- **Run** — `pnpm test --filter @repo/media`
|
||||
|
||||
## Tests
|
||||
|
||||
- **Factories:** `src/__factories__/media.factory.ts` — use `mediaFactory.build({ overrides })` to construct test data with stable defaults.
|
||||
- **Unit tests:** colocated as `*.test.ts` next to the source file.
|
||||
|
||||
```bash
|
||||
pnpm test --filter @repo/media # all tests for this feature
|
||||
pnpm test --filter @repo/media -- --watch # watch mode
|
||||
```
|
||||
|
||||
See `docs/guides/tdd-workflow.md` for the cycle.
|
||||
|
||||
## Structure (minimal)
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user