Test Coverage
Coverage is collected by Jest with Istanbul on every push to main and every pull request. The numbers below were recorded during the last docs build.
Summary
lines
87.8%
898 / 1023
Good
statements
86.9%
969 / 1115
Good
branches
83.3%
359 / 431
Good
functions
87.4%
125 / 143
Good
Tests passed 425 / 429
Test files 18
Thresholds
CI fails if coverage drops below:
| Metric | Minimum | Scope |
|---|---|---|
| Lines | 40% | src/core/** |
| Functions | 33% | src/core/** |
| Branches | 30% | src/core/** |
src/commands/** is excluded; those are covered by smoke and integration tests in CI.
Interactive Report
The full Istanbul HTML report with per-file line-by-line highlighting is available at:
/coverage-report/ on forgekit.build after the docs CI job runs. If the link returns 404, the next push to main will regenerate it.
Run locally
bash
# From repo root
npm test --workspace=packages/cli -- --coverage
# Open the HTML report
open packages/cli/coverage/index.htmlAdding tests
Test files live in packages/cli/src/__tests__/. See Contributing for the full guide.