MCPcopy Index your code
hub / github.com/simstudioai/sim / setupGlobalFetchMock

Function setupGlobalFetchMock

packages/testing/src/mocks/fetch.mock.ts:111–115  ·  view source on GitHub ↗
(defaultResponse?: MockFetchResponse)

Source from the content-addressed store, hash-verified

109 * ```
110 */
111export function setupGlobalFetchMock(defaultResponse?: MockFetchResponse) {
112 const mockFetch = createMockFetch(defaultResponse)
113 vi.stubGlobal('fetch', mockFetch)
114 return mockFetch
115}
116
117/**
118 * Configures fetch to return a specific response for the next call.

Callers 5

executor.mock.tsFile · 0.90
vitest.setup.tsFile · 0.90
vitest.setup.tsFile · 0.90

Calls 1

createMockFetchFunction · 0.85

Tested by

no test coverage detected