fix: improve e2e test robustness with stderr diagnostics and safe cleanup default#971
Open
dyoshikawa wants to merge 1 commit intomainfrom
Open
fix: improve e2e test robustness with stderr diagnostics and safe cleanup default#971dyoshikawa wants to merge 1 commit intomainfrom
dyoshikawa wants to merge 1 commit intomainfrom
Conversation
…anup default Surface stderr output in MCP daemon test assertion message for better failure diagnostics, and initialize cleanup variable with safe default to prevent runtime errors if beforeEach fails. Closes #969 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
cleanupvariable with safe default (async () => {}) to prevent runtime errors ifbeforeEachfailsDetails
MCP daemon test stderr diagnostics (
e2e-mcp.spec.ts)When the MCP daemon test fails (
hasErrorbecomestrue), the assertion previously gave no information about what the actual error was. NowstderrOutputis captured and included in the assertion message.Safe cleanup default (
e2e-helper.ts)The
cleanupvariable was declared without initialization. IfbeforeEachfails before assigningcleanup, theafterEachwould throw a confusing runtime error. Now initialized with a no-op async function.Closes #969
Test plan
pnpm cicheck— all checks pass (format, lint, typecheck, 3685 unit tests, spell check, secret lint)🤖 Generated with Claude Code