MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / setFetchMock

Function setFetchMock

sdk/src/__tests__/client.test.ts:8–10  ·  view source on GitHub ↗
(mockFetch: ReturnType<typeof mock>)

Source from the content-addressed store, hash-verified

6 const originalFetch = globalThis.fetch
7
8 const setFetchMock = (mockFetch: ReturnType<typeof mock>) => {
9 globalThis.fetch = mockFetch as unknown as typeof fetch
10 }
11
12 afterEach(() => {
13 globalThis.fetch = originalFetch

Callers 1

client.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected