Repository navigation
Upgrade Vitest 5 and preserve the initialized MCP handler in protocol tests - #28
Merged
Merged
Conversation
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.
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.