Skip to content

CLI: Review & Achieve ≥85% Unit Test Coverage #46

@simonholmes001

Description

@simonholmes001

Objective

Ensure the CLI codebase maintains at least 85% unit test coverage, with a focus on catching any regression and ensuring new commands are always covered by tests.


Current Status

  • Tests passing: 317
  • Coverage: 100% (meets/exceeds target)
  • CI/CD: All CLI tests and coverage are run automatically on every push/PR via the workflow at .github/workflows/ci.yaml.

CI Commands

CLI test run:

cd cli
npm test

Coverage report (local):

cd cli
npm run test:coverage

Automated Coverage Monitoring

  • The CI workflow (.github/workflows/ci.yaml) will fail PRs if tests fail.
  • Coverage is automatically computed and badges are updated. Any drop in coverage is visible in PR status checks.

Action Items

  • Regularly review coverage reports (HTML, badge in README, or summary in CI).
  • Ensure all new CLI code is covered by unit tests before merging.
  • Actively monitor for regression by addressing decreases in coverage promptly.
  • Refactor or add tests for uncovered logic branches as identified by coverage tooling.

Acceptance Criteria

  • Coverage for CLI never drops below 85% (ideally stays at or near 100%).
  • All critical logic branches, commands, and error cases are tested.
  • PR authors and reviewers check for test/coverage compliance before merge.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions