test: restore missing js-clean-exit fixture; unignore debug-script fixtures - #256
Merged
Conversation
… 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withScript file not found: tests/fixtures/debug-scripts/js-clean-exit.js.Root cause (two layers):
tests/**/*.jsgitignore rule (meant for compiled TS artifacts) madegit addsilently skip it, so it survived only as an untracked local file until branch cleanup deleted it.js-throws.jsonly exists via a force-add —git check-ignoredoesn'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/*.jsso hand-written debuggee fixtures can't be silently dropped again. Compiled artifacts elsewhere undertests/stay ignored.Test plan
npx vitest run tests/e2e/mcp-server-break-on-exceptions.test.ts— 9/9 pass (previously 1 failing)debug-scripts/*reference intests/— no other missing fixturesgit check-ignoreconfirms the new fixture is no longer ignored; plaingit addstages it🤖 Generated with Claude Code