From d7fb4299a31e870d0627a558d97d37b4c83e21ae Mon Sep 17 00:00:00 2001 From: mesalogo Date: Fri, 9 Oct 2026 01:16:21 +0800 Subject: [PATCH] test: use real fetch for supervisor profile coverage --- src/main/ipc.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/ipc.test.ts b/src/main/ipc.test.ts index 09a111fb..5549d73a 100644 --- a/src/main/ipc.test.ts +++ b/src/main/ipc.test.ts @@ -6684,6 +6684,7 @@ describe('registerIpcHandlers agent terminal state', () => { undefined, undefined, undefined, false, undefined, undefined, undefined, undefined, database) const actual = await vi.importActual('./agent/create-runtime') runtimeFactoryMocks.createModelProfileRuntime.mockImplementation(actual.createModelProfileRuntime) + electronMocks.fetch.mockImplementation((input, init) => fetch(input, init)) const profile = { id: crypto.randomUUID(), name: 'Review connection', baseUrl: `http://127.0.0.1:${address.port}/v1`, modelName: 'review-selected', protocol: 'openai-chat-completions', authentication: 'none', requestHeaders: {}, requestBody: { temperature: 0.25 } } @@ -6712,6 +6713,7 @@ describe('registerIpcHandlers agent terminal state', () => { server.closeAllConnections() await new Promise(resolve => server.close(() => resolve())) runtimeFactoryMocks.createModelProfileRuntime.mockReset() + electronMocks.fetch.mockReset() } })