Skip to content

test: restore missing js-clean-exit fixture; unignore debug-script fixtures - #256

Merged
debugmcpdev merged 1 commit into
mainfrom
fix/js-clean-exit-fixture
Aug 4, 2026
Merged

test: restore missing js-clean-exit fixture; unignore debug-script fixtures#256
debugmcpdev merged 1 commit into
mainfrom
fix/js-clean-exit-fixture

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Summary

tests/e2e/mcp-server-break-on-exceptions.test.ts › "reports exit code 0 for a clean run (issue #247)" fails on any fresh checkout with Script file not found: tests/fixtures/debug-scripts/js-clean-exit.js.

Root cause (two layers):

  1. The fixture referenced by the test (added in feat: surface js debuggee exit code (exitCode) via preload shim synthesis #252) was never committed — the blanket tests/**/*.js gitignore rule (meant for compiled TS artifacts) made git add silently skip it, so it survived only as an untracked local file until branch cleanup deleted it.
  2. The trap was invisible because the committed sibling js-throws.js only exists via a force-add — git check-ignore doesn't report tracked files, so nothing looked wrong.

CI never caught it because only the container e2e subset runs there.

Fix: recreate the fixture (timer-callback shape mirroring js-throws.js, natural exit 0) and add a narrow negation !tests/fixtures/debug-scripts/*.js so hand-written debuggee fixtures can't be silently dropped again. Compiled artifacts elsewhere under tests/ stay ignored.

Test plan

  • npx vitest run tests/e2e/mcp-server-break-on-exceptions.test.ts — 9/9 pass (previously 1 failing)
  • Swept every debug-scripts/* reference in tests/ — no other missing fixtures
  • git check-ignore confirms the new fixture is no longer ignored; plain git add stages it

🤖 Generated with Claude Code

… fixtures (issue #247 e2e)

The 'reports exit code 0 for a clean run' e2e test added in PR #252
referenced tests/fixtures/debug-scripts/js-clean-exit.js, but the
fixture never made it into the commit: the blanket tests/**/*.js
ignore (meant for compiled TS artifacts) made 'git add' silently skip
it, so it lived on as an untracked local file until branch cleanup
removed it. Any fresh checkout then failed the test with 'Script file
not found'. CI never caught it because only the container e2e subset
runs there. The committed sibling js-throws.js only exists because it
was force-added, which is why the trap was invisible.

Fix both layers: recreate the fixture (timer-callback shape like
js-throws.js, natural exit 0) and add a narrow gitignore negation for
tests/fixtures/debug-scripts/*.js — hand-written debuggee fixtures,
not TS output — so future fixtures can't be silently dropped. Compiled
artifacts elsewhere under tests/ stay ignored.

Verified: all 9 tests in mcp-server-break-on-exceptions.test.ts pass;
every debug-scripts fixture referenced from tests/ exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit 0fadb89 into main Aug 4, 2026
10 checks passed
@debugmcpdev
debugmcpdev deleted the fix/js-clean-exit-fixture branch August 5, 2026 13:05
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