chore: chore: Fix types in tests 19/N.

This commit is contained in:
cpojer
2026-02-17 12:21:45 +09:00
parent ecfc5a5ee7
commit e09643e82c
8 changed files with 30 additions and 34 deletions

View File

@@ -46,7 +46,6 @@ function stubMinimaxOkFetch() {
base_resp: { status_code: 0, status_msg: "" },
}),
});
// @ts-expect-error partial global
global.fetch = fetch;
vi.stubEnv("MINIMAX_API_KEY", "minimax-test");
return fetch;
@@ -116,7 +115,6 @@ describe("image tool implicit imageModel config", () => {
afterEach(() => {
vi.unstubAllEnvs();
// @ts-expect-error global fetch cleanup
global.fetch = priorFetch;
});
@@ -401,7 +399,6 @@ describe("image tool implicit imageModel config", () => {
base_resp: { status_code: 0, status_msg: "" },
}),
});
// @ts-expect-error partial global
global.fetch = fetch;
vi.stubEnv("MINIMAX_API_KEY", "minimax-test");
@@ -461,7 +458,6 @@ describe("image tool MiniMax VLM routing", () => {
afterEach(() => {
vi.unstubAllEnvs();
// @ts-expect-error global fetch cleanup
global.fetch = priorFetch;
});
@@ -476,7 +472,6 @@ describe("image tool MiniMax VLM routing", () => {
base_resp: baseResp,
}),
});
// @ts-expect-error partial global
global.fetch = fetch;
const agentDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-minimax-vlm-"));

View File

@@ -12,7 +12,6 @@ describe("web_fetch firecrawl apiKey normalization", () => {
const priorFetch = global.fetch;
afterEach(() => {
// @ts-expect-error restore
global.fetch = priorFetch;
vi.restoreAllMocks();
});
@@ -34,7 +33,6 @@ describe("web_fetch firecrawl apiKey normalization", () => {
);
});
// @ts-expect-error mock fetch
global.fetch = fetchSpy;
const { createWebFetchTool } = await import("./web-tools.js");

View File

@@ -23,7 +23,6 @@ describe("web_fetch response size limits", () => {
});
const fetchSpy = vi.fn().mockResolvedValue(response);
// @ts-expect-error mock fetch
global.fetch = fetchSpy;
const tool = createWebFetchTool(baseToolConfig);

View File

@@ -62,7 +62,6 @@ describe("web_fetch SSRF protection", () => {
});
afterEach(() => {
// @ts-expect-error restore
global.fetch = priorFetch;
lookupMock.mockReset();
vi.restoreAllMocks();

View File

@@ -92,7 +92,6 @@ function requestUrl(input: RequestInfo): string {
function installMockFetch(impl: (input: RequestInfo) => Promise<Response>) {
const mockFetch = vi.fn(impl);
// @ts-expect-error mock fetch
global.fetch = mockFetch;
return mockFetch;
}
@@ -141,7 +140,6 @@ describe("web_fetch extraction fallbacks", () => {
});
afterEach(() => {
// @ts-expect-error restore
global.fetch = priorFetch;
vi.restoreAllMocks();
});