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

Function calledRequest

src/shell/platform/createPlatformClient.test.ts:31–39  ·  view source on GitHub ↗
(f: typeof fetch)

Source from the content-addressed store, hash-verified

29}
30
31function calledRequest(f: typeof fetch) {
32 const [url, init] = (f as unknown as Mock<typeof fetch>).mock.calls[0] ?? [];
33 const h = init?.headers as Record<string, string> | undefined;
34 return {
35 url: url as string,
36 method: init?.method ?? "",
37 auth: h?.["Authorization"],
38 };
39}
40
41function callCount(f: typeof fetch): number {
42 return (f as unknown as Mock<typeof fetch>).mock.calls.length;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected