From 0fa32775500ccf15ede2472ee63d9b28681da953 Mon Sep 17 00:00:00 2001 From: Basil Hosmer Date: Tue, 13 May 2025 17:03:43 -0400 Subject: [PATCH] avoid ({}) => ... in tests --- src/server/mcp.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/server/mcp.test.ts b/src/server/mcp.test.ts index a9a56c61..162953af 100644 --- a/src/server/mcp.test.ts +++ b/src/server/mcp.test.ts @@ -526,11 +526,11 @@ describe("tool()", () => { // new api mcpServer.tool("test (new api)", { - description: "Test description", - callback: async ({}) => ({ + description: "Test description", + callback: async () => ({ content: [ { - type: "text", + type: "text" as const, text: "Test response", }, ], @@ -583,11 +583,11 @@ describe("tool()", () => { })); mcpServer.tool("test (new api)", { - annotations: { title: "Test Tool", readOnlyHint: true }, - callback: async ({}) => ({ + annotations: { title: "Test Tool", readOnlyHint: true }, + callback: async () => ({ content: [ { - type: "text", + type: "text" as const, text: "Test response", }, ], @@ -761,8 +761,8 @@ describe("tool()", () => { description: "A tool with everything but empty params", inputSchema: {}, annotations: { title: "Complete Test Tool with empty params", readOnlyHint: true, openWorldHint: false }, - callback: async ({}) => ({ - content: [{ type: "text", text: "Test response" }] + callback: async () => ({ + content: [{ type: "text" as const, text: "Test response" }] }) });