* Sets up global fetch mock with Next.js preconnect support.
(config: MockFetchResponse = {})
| 358 | * Sets up global fetch mock with Next.js preconnect support. |
| 359 | */ |
| 360 | function setupFetchMock(config: MockFetchResponse = {}) { |
| 361 | const mockFetch = createMockFetch(config) |
| 362 | const fetchWithPreconnect = Object.assign(mockFetch, { preconnect: vi.fn() }) as typeof fetch |
| 363 | global.fetch = fetchWithPreconnect |
| 364 | return mockFetch |
| 365 | } |
| 366 | |
| 367 | /** |
| 368 | * Creates a mock execution context with workspaceId for tool tests. |
no test coverage detected