test: set minimum unit test coverage thresholds#486
Conversation
Statements: 55%, Branches: 47%, Functions: 48%, Lines: 54%. Watermarks updated to [current, 80] to track progress toward goal. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Coverage Report for CI Build 24605176228Coverage remained the same at 54.843%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Updates NYC (Istanbul) configuration to align coverage thresholds and report watermarks with the project’s current measured coverage levels, aiming to prevent coverage regressions and visualize progress toward an 80% goal.
Changes:
- Lowered NYC global coverage thresholds to current baseline values (Statements 55%, Branches 47%, Functions 48%, Lines 54%).
- Updated NYC report watermarks to
[current, 80]for each metric.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "branches": 47, | ||
| "lines": 54, | ||
| "functions": 48, | ||
| "statements": 55, |
There was a problem hiding this comment.
The numeric thresholds (branches/lines/functions/statements) are only enforced by nyc when coverage checking is enabled (e.g., via --check-coverage or "check-coverage": true). As written, CI runs nyc ... npm run test:unit without --check-coverage, so these values may not actually prevent coverage regressions despite the PR description. Consider enabling check-coverage in this config or adding --check-coverage to the cover:* scripts.
| "branches": 47, | ||
| "lines": 54, | ||
| "functions": 48, | ||
| "statements": 55, |
There was a problem hiding this comment.
This .nycrc.json is used by both cover:unit and cover:integration (the integration docker compose mounts it into the container). Lowering thresholds/watermarks here will apply to integration coverage too, even though the PR title/description frames this as “unit test” thresholds. If the intent is unit-only gating, consider splitting configs (e.g., .nycrc.unit.json / .nycrc.integration.json) and pointing each script to the appropriate file.
Summary
[current, 80]— tracks progress toward the 80% goalTest plan
npm run cover:unitpasses without coverage threshold errors🤖 Generated with Claude Code