diff --git a/src/agents/models-config.providers.ollama-autodiscovery.test.ts b/src/agents/models-config.providers.ollama-autodiscovery.test.ts index c20bf4051ea..910f0e056e6 100644 --- a/src/agents/models-config.providers.ollama-autodiscovery.test.ts +++ b/src/agents/models-config.providers.ollama-autodiscovery.test.ts @@ -44,7 +44,7 @@ describe("Ollama auto-discovery", () => { }; } throw new Error(`Unexpected fetch: ${url}`); - }) as typeof fetch; + }) as unknown as typeof fetch; const agentDir = mkdtempSync(join(tmpdir(), "openclaw-test-")); const providers = await resolveImplicitProviders({ agentDir }); @@ -64,7 +64,9 @@ describe("Ollama auto-discovery", () => { const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {}); globalThis.fetch = vi .fn() - .mockRejectedValue(new Error("connect ECONNREFUSED 127.0.0.1:11434")) as typeof fetch; + .mockRejectedValue( + new Error("connect ECONNREFUSED 127.0.0.1:11434"), + ) as unknown as typeof fetch; const agentDir = mkdtempSync(join(tmpdir(), "openclaw-test-")); const providers = await resolveImplicitProviders({ agentDir }); @@ -82,7 +84,9 @@ describe("Ollama auto-discovery", () => { const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {}); globalThis.fetch = vi .fn() - .mockRejectedValue(new Error("connect ECONNREFUSED 127.0.0.1:11434")) as typeof fetch; + .mockRejectedValue( + new Error("connect ECONNREFUSED 127.0.0.1:11434"), + ) as unknown as typeof fetch; const agentDir = mkdtempSync(join(tmpdir(), "openclaw-test-")); await resolveImplicitProviders({ diff --git a/src/slack/send.upload.test.ts b/src/slack/send.upload.test.ts index c1adf325237..4b8b3d431cf 100644 --- a/src/slack/send.upload.test.ts +++ b/src/slack/send.upload.test.ts @@ -61,7 +61,9 @@ describe("sendMessageSlack file upload with user IDs", () => { const originalFetch = globalThis.fetch; beforeEach(() => { - globalThis.fetch = vi.fn(async () => new Response("ok", { status: 200 })) as typeof fetch; + globalThis.fetch = vi.fn( + async () => new Response("ok", { status: 200 }), + ) as unknown as typeof fetch; fetchWithSsrFGuard.mockClear(); });