MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / makeFetch

Function makeFetch

src/commands/auth.test.ts:596–603  ·  view source on GitHub ↗
(response: Response | Error)

Source from the content-addressed store, hash-verified

594
595describe('runWhoami', () => {
596 function makeFetch(response: Response | Error): typeof fetch {
597 if (response instanceof Error) {
598 return vi.fn(async () => {
599 throw response;
600 }) as unknown as typeof fetch;
601 }
602 return vi.fn(async () => response) as unknown as typeof fetch;
603 }
604
605 function meResponse(): Response {
606 return new Response(JSON.stringify(sampleMe), {

Callers 1

auth.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected