mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 05:12:15 +00:00
test: restore fetch stubs in embedding suites
This commit is contained in:
@@ -44,7 +44,7 @@ const createGeminiBatchFetchMock = (count: number, embeddingValues = [1, 2, 3])
|
||||
}));
|
||||
|
||||
function installFetchMock(fetchMock: typeof globalThis.fetch) {
|
||||
globalThis.fetch = fetchMock;
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
}
|
||||
|
||||
function readFirstFetchRequest(fetchMock: { mock: { calls: unknown[][] } }) {
|
||||
|
||||
@@ -39,7 +39,7 @@ const createFetchMock = () => {
|
||||
};
|
||||
|
||||
function installFetchMock(fetchMock: typeof globalThis.fetch) {
|
||||
globalThis.fetch = fetchMock;
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
}
|
||||
|
||||
let authModule: typeof import("../../../../src/agents/model-auth.js");
|
||||
|
||||
@@ -37,7 +37,7 @@ const createGeminiFetchMock = () =>
|
||||
}));
|
||||
|
||||
function installFetchMock(fetchMock: typeof globalThis.fetch) {
|
||||
globalThis.fetch = fetchMock;
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
}
|
||||
|
||||
function readFirstFetchRequest(fetchMock: { mock: { calls: unknown[][] } }) {
|
||||
|
||||
Reference in New Issue
Block a user