Skip to content

test: lift coverage on jvm-orphan-reaper (36->97%) and minimal-dap (85->92%)#71

Merged
debugmcpdev merged 1 commit into
mainfrom
test/coverage-jvm-reaper-and-minimal-dap
May 15, 2026
Merged

test: lift coverage on jvm-orphan-reaper (36->97%) and minimal-dap (85->92%)#71
debugmcpdev merged 1 commit into
mainfrom
test/coverage-jvm-reaper-and-minimal-dap

Conversation

@debugmcpdev
Copy link
Copy Markdown
Collaborator

Summary

  • src/utils/jvm-orphan-reaper.ts: 36% → 97% line coverage. Expose parseArgs, listLinux, listDarwin, listWindows, defaultKill as @internal named exports so platform-specific helpers can be unit-tested on any host. Matches the file's existing test-seam pattern (lister/isAlive/killer are already injectable via ReapOptions). Add 31 tests covering pure parsing, process.kill paths, and all three platform listers via vi.mock of node:fs/promises + node:child_process.
  • src/proxy/minimal-dap.ts: 85% → 92% line coverage. Add 10 tests for normalizeAdapterId branches, the non-stackTrace child-wait loop, child fallback (graceful completion, fall-through, rethrow), configurationDone deferral edge cases, and trace-file error swallowing.

No runtime behavior changes; only @internal export keywords added to previously-private helpers.

Coverage delta

File Before After Lines missing
src/utils/jvm-orphan-reaper.ts 36% 97.32% 72 → 3
src/proxy/minimal-dap.ts 85% 92.20% 46 → 24

The reaper's remaining 3 missing lines are deep inside platform-specific error sub-branches that aren't worth contortion-testing. Minimal-dap's remaining 24 are inside deep child-session timing branches that would need integration-style fixtures rather than unit tests.

Test plan

  • npm run lint — clean
  • npx tsc --noEmit — clean
  • npm run test:unit1758 / 1758 pass (+41 net new tests vs. baseline)
  • npm run test:coverage:summary — overall coverage 87.72% statements / 88.2% lines
  • npm run check:personal-paths — clean (pre-commit hook passed)
  • Existing tests/unit/utils/jvm-orphan-reaper.test.ts (8 orchestration tests) still passes against the modified source

🤖 Generated with Claude Code

jvm-orphan-reaper.ts: 36% -> 97% lines.
  Expose parseArgs, listLinux, listDarwin, listWindows, defaultKill as
  @internal exports so platform-specific code can be unit-tested on any
  host. Add 31 tests covering pure parsing, process.kill paths, and all
  three platform listers via vi.mock of node:fs/promises and
  node:child_process.

minimal-dap.ts: 85% -> 92% lines.
  Add 10 tests for normalizeAdapterId branches, the non-stackTrace
  child-wait loop, child fallback (graceful, fall-through, rethrow),
  configurationDone deferral edge cases, and trace-file error swallowing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev debugmcpdev merged commit 24b2467 into main May 15, 2026
9 checks passed
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.

2 participants