mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:38:28 +00:00
test: add fetch mock helper and reaction coverage
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { withFetchPreconnect } from "../test-utils/fetch-mock.js";
|
||||
|
||||
describe("minimaxUnderstandImage apiKey normalization", () => {
|
||||
const priorFetch = global.fetch;
|
||||
@@ -21,7 +22,7 @@ describe("minimaxUnderstandImage apiKey normalization", () => {
|
||||
{ status: 200, headers: { "Content-Type": "application/json" } },
|
||||
);
|
||||
});
|
||||
global.fetch = fetchSpy;
|
||||
global.fetch = withFetchPreconnect(fetchSpy);
|
||||
|
||||
const { minimaxUnderstandImage } = await import("./minimax-vlm.js");
|
||||
const text = await minimaxUnderstandImage({
|
||||
|
||||
Reference in New Issue
Block a user