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

Function setFetchMock

cli/src/__tests__/integration/api-integration.test.ts:39–45  ·  view source on GitHub ↗
(
    impl: Parameters<typeof mock>[0],
  )

Source from the content-addressed store, hash-verified

37 }) as LoggerMocks
38
39 const setFetchMock = (
40 impl: Parameters<typeof mock>[0],
41 ): ReturnType<typeof mock> => {
42 const fetchMock = mock(impl)
43 globalThis.fetch = fetchMock as unknown as typeof fetch
44 return fetchMock
45 }
46
47 // Store original setTimeout to restore later
48 const originalSetTimeout = globalThis.setTimeout

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected