MCPcopy Create free account
hub / github.com/anus-dev/ANUS / createMockMCPTool

Function createMockMCPTool

packages/cli/src/ui/commands/mcpCommand.test.ts:46–61  ·  view source on GitHub ↗
(
  name: string,
  serverName: string,
  description?: string,
)

Source from the content-addressed store, hash-verified

44
45// Helper function to create a mock DiscoveredMCPTool
46const createMockMCPTool = (
47 name: string,
48 serverName: string,
49 description?: string,
50) =>
51 new DiscoveredMCPTool(
52 {
53 callTool: vi.fn(),
54 tool: vi.fn(),
55 } as unknown as CallableTool,
56 serverName,
57 name,
58 description || `Description for ${name}`,
59 { type: Type.OBJECT, properties: {} },
60 name, // serverToolName same as name for simplicity
61 );
62
63describe('mcpCommand', () => {
64 let mockContext: ReturnType<typeof createMockCommandContext>;

Callers 1

mcpCommand.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected