Skip to content

test: raise unit coverage to ~99.9% and enforce coverage thresholds#65

Merged
Bccorb merged 1 commit into
mainfrom
test/expand-unit-coverage
Jul 17, 2026
Merged

test: raise unit coverage to ~99.9% and enforce coverage thresholds#65
Bccorb merged 1 commit into
mainfrom
test/expand-unit-coverage

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a comprehensive unit test suite across the CLI and sets a Vitest coverage floor so coverage cannot silently regress.

  • Unit tests across commands, core, generators, prompts, utils, and the entry dispatcher, raising line coverage from ~23% to ~99.9%.
  • Tests are co-located *.test.ts, follow the repo's dependency-injection style, and mock external boundaries (@clack/prompts, fs, child_process, network, keyring) without changing any source.
  • Vitest thresholds added as a regression floor: lines/statements 99, functions 99, branches 95. Remaining uncovered lines are unreachable branches (a private multiline-env helper in the docker generator).

Verification

  • npm run build passes.
  • npm run coverage passes: 46 test files / 548 tests (1 gated e2e file skipped). All files at 99.88% lines, 96.92% branches, above the configured floors.

Notes

This branch is the test-expansion work rebased cleanly onto current main. The original test/coverage-push branch predated a main history rewrite, so only the single test commit was lifted onto the current base to keep the diff focused.

Add unit tests across the CLI (commands, core, generators, prompts, utils,
and the entry dispatcher), bringing line coverage from 23% to 99.9%. Tests
are co-located *.test.ts, follow the repo's dependency-injection style, and
mock external boundaries (@clack/prompts, fs, child_process, network, keyring)
without changing any source.

Add Vitest coverage thresholds (lines/statements 99, functions 99, branches 95)
as a regression floor. The remaining uncovered lines are unreachable branches
(a private multiline-env helper in the docker generator).
@Bccorb
Bccorb merged commit de824bf into main Jul 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant