Commit eaffb31
Alexander Doroshevich
test: add unit tests for ServerVersionNegotiationScenario
13 tests covering all check outcomes without a real server (fetch stubbed
with vi.stubGlobal):
version-echo: SUCCESS (happy path), FAILURE (wrong version, JSON-RPC error,
missing protocolVersion field)
version-negotiate: FAILURE (JSON-RPC error, 1999-01-01 echo-back),
WARNING (2026-03-15 -- valid format but not a known spec release)
http-protocol-version-header: SUCCESS (-32601 method not found),
FAILURE (HTTP 4xx), SKIPPED (transport error, fetch called exactly twice),
WARNING (unexpected JSON-RPC error, unparseable 2xx body)
Regression: check 3 sends the version returned by check 1 as the
MCP-Protocol-Version header, not the hardcoded CURRENT_PROTOCOL_VERSION
constant.1 parent f9f9ce6 commit eaffb31
1 file changed
+402
-0
lines changed
0 commit comments