MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / recordingFetch

Function recordingFetch

packages/server-e2e/test/client.test.ts:569–577  ·  view source on GitHub ↗
(responseBody: unknown, calls: FetchCall[])

Source from the content-addressed store, hash-verified

567}
568
569function recordingFetch(responseBody: unknown, calls: FetchCall[]): typeof fetch {
570 return (async (input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]) => {
571 calls.push({ url: fetchInputUrl(input), init: init ?? {} });
572 return new Response(JSON.stringify(responseBody), {
573 status: 200,
574 headers: { 'content-type': 'application/json' },
575 });
576 }) as typeof fetch;
577}
578
579function recordingFetchSequence(responseBodies: unknown[], calls: FetchCall[]): typeof fetch {
580 let index = 0;

Callers 1

client.test.tsFile · 0.85

Calls 2

fetchInputUrlFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected