Skip to content

fix: improve e2e test robustness with stderr diagnostics and safe cleanup default#971

Merged
dyoshikawa merged 1 commit intomainfrom
fix/improve-e2e-test-robustness
Feb 6, 2026
Merged

fix: improve e2e test robustness with stderr diagnostics and safe cleanup default#971
dyoshikawa merged 1 commit intomainfrom
fix/improve-e2e-test-robustness

Conversation

@dyoshikawa
Copy link
Owner

Summary

  • Surface stderr output in MCP daemon test assertion message for better failure diagnostics
  • Initialize cleanup variable with safe default (async () => {}) to prevent runtime errors if beforeEach fails

Details

MCP daemon test stderr diagnostics (e2e-mcp.spec.ts)

When the MCP daemon test fails (hasError becomes true), the assertion previously gave no information about what the actual error was. Now stderrOutput is captured and included in the assertion message.

Safe cleanup default (e2e-helper.ts)

The cleanup variable was declared without initialization. If beforeEach fails before assigning cleanup, the afterEach would 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

…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>
@dyoshikawa dyoshikawa merged commit b70511d into main Feb 6, 2026
10 checks passed
@dyoshikawa dyoshikawa deleted the fix/improve-e2e-test-robustness branch February 6, 2026 12:48
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.

Improve e2e test robustness: MCP daemon stderr diagnostics and helper cleanup safety

1 participant