MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / fakeClient

Function fakeClient

graph-ui/src/app/coverage-source.test.ts:60–76  ·  view source on GitHub ↗

Ein Client, der genau die vorbereiteten Antworten gibt und alles mitschreibt.

(pages: unknown[], status: unknown = STATUS)

Source from the content-addressed store, hash-verified

58
59/** Ein Client, der genau die vorbereiteten Antworten gibt und alles mitschreibt. */
60function fakeClient(pages: unknown[], status: unknown = STATUS) {
61 const calls: Record<string, unknown>[] = [];
62 let index = 0;
63 const client = {
64 indexStatusPayload: vi.fn(async () => {
65 calls.push({ tool: 'index_status' });
66 return status;
67 }),
68 checkIndexCoverage: vi.fn(async (_project: string, args: Record<string, unknown>) => {
69 calls.push({ tool: 'check_index_coverage', ...args });
70 const answer = pages[Math.min(index, pages.length - 1)];
71 index += 1;
72 return answer;
73 }),
74 } as unknown as RpcIntelligenceClient;
75 return { client, calls };
76}
77
78describe('loadCoverage', () => {
79

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected