[pull] main from modelcontextprotocol:main#300
Merged
pull[bot] merged 6 commits intothreatcode:mainfrom Feb 7, 2026
Merged
Conversation
Adds comprehensive test coverage for the Everything Server including: Tools (10 tools tested): - echo: message echoing with validation - get-sum: number addition with edge cases - get-env: environment variable retrieval - get-tiny-image: image content blocks - get-structured-content: weather data for all cities - get-annotated-message: priority/audience annotations - trigger-long-running-operation: progress notifications - get-resource-links: dynamic resource link generation - get-resource-reference: text/blob resource validation Prompts (4 prompts tested): - simple-prompt: no-argument prompt - args-prompt: city/state arguments - completable-prompt: department/name completions - resource-prompt: embedded resource references Resources: - templates.ts: URI generation, text/blob resources - session.ts: session-scoped resource registration Test infrastructure: - vitest.config.ts with v8 coverage - Mock server helper for capturing registered handlers - 81 tests, all passing Closes #2925 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete test coverage for all 16 Everything Server tools: New tests added: - toggle-simulated-logging: start/stop logging toggle, session handling - toggle-subscriber-updates: start/stop updates toggle, session handling - trigger-sampling-request: capability check, sampling request/response - trigger-elicitation-request: capability check, accept/decline/cancel actions - get-roots-list: capability check, registration - gzip-file-as-resource: compression, resource/resourceLink output types Test count: 102 tests (was 81) Coverage: 64.73% overall, 90.93% tools (was 34%, 40%) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Additional test coverage: - server/index.ts: createServer factory, cleanup function (91% coverage) - tools/index.ts: registerTools, registerConditionalTools (100% coverage) - prompts/index.ts: registerPrompts (100% coverage) - resources/index.ts: registerResources, readInstructions (88% coverage) - resources/files.ts: registerFileResources (54% coverage) - resources/subscriptions.ts: handlers, begin/stop updates (47% coverage) Test count: 124 tests (was 102) Coverage: 71.35% overall (was 64.73%) - Tools: 93.12% - Prompts: 90.53% - Server: 62.93% - Resources: 65.44% Note: Transport files (stdio.ts, sse.ts, streamableHttp.ts) are entry points that start Express servers. These require integration tests rather than unit tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed ~29 tests that were adding noise rather than coverage: - Registration boilerplate tests (16): redundant with registrations.test.ts - Redundant role/type checks (3): consolidated into behavioral tests - "Should not throw" tests (6): consolidated into single lifecycle test - Constant identity tests (2): provided no safety net - expect(true).toBe(true) test (1): replaced with actual assertion - Weak capability test (1): removed, handler check already exists Strengthened remaining tests: - Resource templates test now verifies specific resource names - File resources test now asserts registerResource was called Test count: 124 → 95 (29 removed) Coverage unchanged at ~71% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The upstream main added simulate-research-query and async tools that use server.experimental.tasks.registerToolTask. Update mock servers to include this API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Vitest tests for Everything Server
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )