From 9defce18e0aeec7221a1f738a54a36663d801937 Mon Sep 17 00:00:00 2001 From: "yoyo-evolve[bot]" Date: Fri, 21 Aug 2026 21:44:15 +0000 Subject: [PATCH] yoyo: fix ping test to match MCP v2 ok() wrapper The ok() helper now adds resultType and _meta with serverInfo to every result per the MCP v2 spec. Updated the ping test expectation to match. --- src/lib/__tests__/mcp-http.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/__tests__/mcp-http.test.ts b/src/lib/__tests__/mcp-http.test.ts index 46bbc08c..e7ed0e16 100644 --- a/src/lib/__tests__/mcp-http.test.ts +++ b/src/lib/__tests__/mcp-http.test.ts @@ -60,7 +60,12 @@ describe("dispatchMcp — protocol", () => { it("ping returns an empty result", async () => { const res = await dispatchMcp({ id: 2, method: "ping" }, null); - expect(res!.result).toEqual({}); + expect(res!.result).toEqual({ + resultType: "complete", + _meta: { + "io.modelcontextprotocol/serverInfo": MCP_SERVER_INFO, + }, + }); }); it("notifications get no response (null)", async () => {