docs(navigation): correct file references in Tests section

The previous commit referenced nonexistent files
(navigation-repository.contract.ts, tests/get-header.feature.test.ts).
The actual contract is header-repository.contract.ts and navigation has
no tests/ directory yet. Also adds nav-item.factory.ts to the factories
bullet (created in Task 3).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 19:33:11 +02:00
parent 5ea4c67f93
commit 87112c43b0

View File

@@ -71,10 +71,10 @@ beforeEach(() => {
## Tests
- **Factories:** `src/__factories__/header.factory.ts` — use `headerFactory.build({ overrides })` to construct test data with stable defaults.
- **Contract suite:** `src/__contracts__/navigation-repository.contract.ts` — runs against every repository implementation (mock + payload).
- **Factories:** `src/__factories__/header.factory.ts` and `src/__factories__/nav-item.factory.ts` — use `headerFactory.build({ overrides })` and `navItemFactory.build({ overrides })` to construct test data with stable defaults.
- **Contract suite:** `src/__contracts__/header-repository.contract.ts` — runs against every repository implementation (mock + payload).
- **Unit tests:** colocated as `*.test.ts` next to the source file.
- **Feature integration:** `tests/get-header.feature.test.ts` — full slice through tRPC router → controller → use case → mock repo.
- **Feature integration:** none today (no `tests/` directory yet); add when a multi-layer flow needs end-to-end coverage.
```bash
pnpm test --filter @repo/navigation # all tests for this feature