We strive for high test coverage to ensure reliability and maintainability.
To generate a coverage report:
pnpm test --coverageThis will produce a coverage report in the coverage/ directory and output a summary table to the console.
| Metric | Target |
|---|---|
| Statements | > 80% |
| Branches | > 80% |
| Functions | > 80% |
| Lines | > 80% |
Note: Critical packages may enforce stricter thresholds (e.g., 95%).
- Local: Open
coverage/index.htmlin your browser to inspect line-by-line coverage. - CI: Coverage reports are generated during CI builds and may be uploaded to a coverage provider (e.g., Codecov) or stored as artifacts.
- Test Files: Excluded from coverage.
- Build Artifacts:
dist/andbuild/directories are excluded. - Configuration: Config files like
eslint.config.jsmay be excluded.