Skip to content

Commit 10414c3

Browse files
committed
test(mcp): type the registration mocks by their signature, not an unused parameter
The mocks in the test of an arm that serves no engine named a parameter only to type their calls, which ESLint reports as unused; they now pass the signature to mock as other tests do.
1 parent 2e4285d commit 10414c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/unit/mcp/statement-arms.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,18 +1401,18 @@ describe("the tool each engine is read with", () => {
14011401
mongo: idle,
14021402
} as unknown as typeof MCP_STATEMENT_ARMS;
14031403
expect(servingStatementArms(arms)).toEqual([RUN_READ_QUERY_ARM]);
1404-
const registerTool = mock((_name: string) => undefined);
1404+
const registerTool = mock<(name: string) => undefined>(() => undefined);
14051405
registerStatementTools({ registerTool } as unknown as McpServer, {} as McpConnectionContext, undefined, arms);
14061406
expect(registerTool.mock.calls.map(([name]) => name)).toEqual(["run_read_query"]);
1407-
const reachMongo = mock((_name: string) => undefined);
1407+
const reachMongo = mock<(name: string) => undefined>(() => undefined);
14081408
registerStatementTools(
14091409
{ registerTool: reachMongo } as unknown as McpServer,
14101410
{} as McpConnectionContext,
14111411
new Set(["mongodb"]),
14121412
arms,
14131413
);
14141414
expect(reachMongo.mock.calls).toEqual([]);
1415-
const reachSqlite = mock((_name: string) => undefined);
1415+
const reachSqlite = mock<(name: string) => undefined>(() => undefined);
14161416
registerStatementTools(
14171417
{ registerTool: reachSqlite } as unknown as McpServer,
14181418
{} as McpConnectionContext,

0 commit comments

Comments
 (0)