


























@@ -1,5 +1,5 @@
11import { afterEach, describe, expect, it, vi } from "vitest";
2-import { withFetchPreconnect } from "../../test-support.js";
2+import { withBrowserFetchPreconnect } from "../../test-fetch.js";
3344vi.hoisted(() => {
55vi.resetModules();
@@ -82,7 +82,7 @@ async function openManagedTabWithRunningProfile(params: {
8282fetchMock: ReturnType<typeof vi.fn>;
8383url?: string;
8484}) {
85-global.fetch = withFetchPreconnect(params.fetchMock);
85+global.fetch = withBrowserFetchPreconnect(params.fetchMock);
8686const state = makeState("openclaw");
8787seedRunningProfileState(state);
8888const ctx = createBrowserRouteContext({ getState: () => state });
@@ -115,7 +115,7 @@ describe("browser server-context tab selection state", () => {
115115} as unknown as Response;
116116});
117117118-global.fetch = withFetchPreconnect(fetchMock);
118+global.fetch = withBrowserFetchPreconnect(fetchMock);
119119const state = makeState("openclaw");
120120const ctx = createBrowserRouteContext({ getState: () => state });
121121const openclaw = ctx.forProfile("openclaw");
@@ -159,7 +159,7 @@ describe("browser server-context tab selection state", () => {
159159} as unknown as Response;
160160});
161161162-global.fetch = withFetchPreconnect(fetchMock);
162+global.fetch = withBrowserFetchPreconnect(fetchMock);
163163const state = makeState("openclaw");
164164state.resolved.ssrfPolicy = {};
165165const ctx = createBrowserRouteContext({ getState: () => state });
@@ -225,7 +225,7 @@ describe("browser server-context tab selection state", () => {
225225throw new Error(`unexpected fetch: ${value}`);
226226});
227227228-global.fetch = withFetchPreconnect(fetchMock);
228+global.fetch = withBrowserFetchPreconnect(fetchMock);
229229const state = makeState("openclaw");
230230seedRunningProfileState(state);
231231const ctx = createBrowserRouteContext({ getState: () => state });
@@ -245,7 +245,7 @@ describe("browser server-context tab selection state", () => {
245245},
246246});
247247248-global.fetch = withFetchPreconnect(fetchMock);
248+global.fetch = withBrowserFetchPreconnect(fetchMock);
249249const state = makeState("openclaw");
250250state.resolved.attachOnly = true;
251251const ctx = createBrowserRouteContext({ getState: () => state });
@@ -287,7 +287,7 @@ describe("browser server-context tab selection state", () => {
287287throw new Error("unexpected fetch");
288288});
289289290-global.fetch = withFetchPreconnect(fetchMock);
290+global.fetch = withBrowserFetchPreconnect(fetchMock);
291291const state = makeState("openclaw");
292292const ctx = createBrowserRouteContext({ getState: () => state });
293293const openclaw = ctx.forProfile("openclaw");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。