mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-17 23:53:24 +02:00
Add Vitest tests for Everything Server
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>
This commit is contained in:
@@ -26,7 +26,8 @@
|
||||
"start:sse": "node dist/index.js sse",
|
||||
"start:streamableHttp": "node dist/index.js streamableHttp",
|
||||
"prettier:fix": "prettier --write .",
|
||||
"prettier:check": "prettier --check ."
|
||||
"prettier:check": "prettier --check .",
|
||||
"test": "vitest run --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.26.0",
|
||||
@@ -39,8 +40,10 @@
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/express": "^5.0.6",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"shx": "^0.3.4",
|
||||
"typescript": "^5.6.2",
|
||||
"prettier": "^2.8.8"
|
||||
"prettier": "^2.8.8",
|
||||
"vitest": "^2.1.8"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user