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

Function mockFetchStatus

apps/kimi-code/test/cli/update/cdn.test.ts:14–20  ·  view source on GitHub ↗
(status: number)

Source from the content-addressed store, hash-verified

12}
13
14function mockFetchStatus(status: number): typeof fetch {
15 return vi.fn(async () => ({
16 ok: status >= 200 && status < 300,
17 status,
18 text: async () => '',
19 })) as unknown as typeof fetch;
20}
21
22type Route = { readonly status?: number; readonly body?: string } | Error;
23

Callers 1

cdn.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected