MCPcopy Index your code
hub / github.com/qawolf/cli / mockFetch

Function mockFetch

src/shell/platform/createPlatformClient.test.ts:25–29  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

23}
24
25function mockFetch(response: Response): typeof fetch {
26 return mock<typeof fetch>().mockResolvedValue(
27 response,
28 ) as unknown as typeof fetch;
29}
30
31function calledRequest(f: typeof fetch) {
32 const [url, init] = (f as unknown as Mock<typeof fetch>).mock.calls[0] ?? [];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected