Purpose
- Feature name: Unit testing
- Why this feature exists: Validate core logic such as registry validation and link construction.
Scope
In scope
- Vitest unit test suite
- full source coverage targets
Out of scope
- E2E testing
- performance budgets
- Vitest configured in the app
- test data and fixtures available
Procedure / Content
Feature summary
- Feature name: Unit testing
- Feature group: Testing and quality gates
- Technical summary: Runs deterministic tests across core utilities, API handlers, components, and pages.
- Low-tech summary: Confirms the app logic works before shipping.
Feature in action
- Where to see it working:
pnpm test:unit in the app repo.
Confirmation Process
Manual
- Steps: Run
pnpm test:unit and review output (currently 195 tests across 39 files).
- What to look for: All tests pass with expected coverage.
- Artifacts or reports to inspect: CI test job logs.
Tests
- Unit tests:
- E2E tests: None.
- Unit test coverage drops below target.
- Tests fail due to schema or helper changes.
Long-term maintenance notes
- Update tests when registry schema changes.
- Keep coverage thresholds aligned with policies.
Source code references (GitHub URLs)
ADRs
Runbooks
Additional internal references
External reference links
Validation / Expected outcomes
- Unit tests pass in CI and locally.
- Coverage targets are met across the full source tree.
Failure modes / Troubleshooting
- Failing tests: update fixtures or implementation, then re-run.
References