Skip to content

Upgrade Vitest 5 and preserve the initialized MCP handler in protocol tests - #28

Merged
M-T-D-N merged 2 commits into
mainfrom
codex/vitest5-mcp-init
Oct 16, 2026
Merged

M-T-D-N merged 2 commits into
mainfrom
codex/vitest5-mcp-init

Conversation

@M-T-D-N

@M-T-D-N M-T-D-N commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Supersedes #26 on current source; depends on the SDK-only #27, which must merge first. Vitest 5 clears mock call history before each test by default. The protocol suite previously looked up the module-initialization handler from mock.calls during every test, producing four undefined[0] failures. Capture the actual registered handler while the suite is collected and invoke that same function directly. All four protocol-version assertions are unchanged; global mock clearing remains enabled and no tests are skipped.

Reproduction with unmodified tests on Vitest 5.0.3: 4 failed / 30 passed. After the fix: 34 passed. Typecheck passed and full source suite passed: 4,253 passed / 35 existing skipped. Exact-head full Windows CI is required before merge. This is a development dependency/test-only change; no managed runtime execution path is changed by this commit. The combined task will separately apply the runtime SDK update and complete operating/native/Qwen E2E.

No new release/tag or replacement of preview.17 assets.

Reviewed with Codex assistance.

@M-T-D-N
M-T-D-N merged commit 8d6e239 into main Oct 16, 2026
1 check passed
@M-T-D-N
M-T-D-N deleted the codex/vitest5-mcp-init branch October 16, 2026 07:56
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.

1 participant