From 30cd65a205d505d1d432f683b3af2f543cd428ac Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 12 May 2025 10:34:39 -0700 Subject: [PATCH] Update MCPConnection.test.ts --- core/context/mcp/MCPConnection.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/context/mcp/MCPConnection.test.ts b/core/context/mcp/MCPConnection.test.ts index f2b13ca10..acfc6618a 100644 --- a/core/context/mcp/MCPConnection.test.ts +++ b/core/context/mcp/MCPConnection.test.ts @@ -64,10 +64,10 @@ describe("MCPConnection", () => { url: "http://test.com/events", requestOptions: { headers: { - "Authorization": "Bearer token123", - "X-Custom-Header": "custom-value" - } - } + Authorization: "Bearer token123", + "X-Custom-Header": "custom-value", + }, + }, }, }; @@ -172,7 +172,7 @@ describe("MCPConnection", () => { expect(mockConnect).toHaveBeenCalled(); }); - it('should handle custom connection timeout', async () => { + it("should handle custom connection timeout", async () => { const conn = new MCPConnection({ ...options, timeout: 11 }); const mockConnect = jest .spyOn(Client.prototype, "connect") @@ -199,7 +199,7 @@ describe("MCPConnection", () => { await conn.connectClient(false, abortController.signal); expect(conn.status).toBe("error"); - expect(conn.errors[0]).toContain("Failed to connect to MCP server"); + expect(conn.errors[0]).toContain("Failed to connect"); expect(mockConnect).toHaveBeenCalled(); });