(defaultResponse?: MockFetchResponse)
| 109 | * ``` |
| 110 | */ |
| 111 | export 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. |
no test coverage detected