Skip to content

Commit 8655eaa

Browse files
committed
✅ test: add MCP smoke-test infrastructure and initial e2e test suites
Introduce an in-process MCP test harness that boots a real server with InMemoryTransport, injects a capturing command executor, and exposes an MCP client for end-to-end assertions. Includes four smoke-test suites: CLI surface (help/version/tools), MCP discovery (listTools coverage), MCP invocation (callTool with mocked commands), and session management (defaults round-trip). Adds test-only reset/override hooks in command.ts, server-state.ts, tool-registry.ts, and debugger/tool-context.ts to support singleton teardown between test runs. Separates smoke tests from unit tests via a dedicated vitest.smoke.config.ts and a new test:smoke npm script.
1 parent f0bd066 commit 8655eaa

23 files changed

Lines changed: 3787 additions & 2 deletions

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"docs:update": "npx tsx scripts/update-tools-docs.ts",
3434
"docs:update:dry-run": "npx tsx scripts/update-tools-docs.ts --dry-run --verbose",
3535
"test": "vitest run",
36+
"test:smoke": "vitest run --config vitest.smoke.config.ts",
3637
"test:watch": "vitest",
3738
"test:ui": "vitest --ui",
3839
"test:coverage": "vitest run --coverage"

0 commit comments

Comments
 (0)