MCPcopy Create free account
hub / github.com/TanStack/ai / fakePool

Function fakePool

packages/ai-mcp/tests/apps/call-handler.test.ts:50–59  ·  view source on GitHub ↗
(servers: Record<string, ServerInfo>)

Source from the content-addressed store, hash-verified

48// so the object genuinely satisfies MCPClients — no cast needed — but throw if
49// ever exercised.
50function fakePool(servers: Record<string, ServerInfo>): MCPClients {
51 return {
52 clients: {},
53 tools: unreached('tools'),
54 readResource: unreached('readResource'),
55 getServers: () => servers,
56 close: unreached('close'),
57 [Symbol.asyncDispose]: unreached('asyncDispose'),
58 }
59}
60
61// Fake single client. The handler only reads `getInfo`; the rest are real
62// members that throw if reached.

Callers 2

weatherPoolHandlerFunction · 0.85

Calls 1

unreachedFunction · 0.85

Tested by

no test coverage detected