mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-28 00:43:57 +00:00
test: isolate server-context browser harness imports
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
||||||
import { EventEmitter } from "node:events";
|
import { EventEmitter } from "node:events";
|
||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
vi.hoisted(() => {
|
||||||
|
vi.resetModules();
|
||||||
|
});
|
||||||
|
|
||||||
import "./server-context.chrome-test-harness.js";
|
import "./server-context.chrome-test-harness.js";
|
||||||
import * as chromeModule from "./chrome.js";
|
import * as chromeModule from "./chrome.js";
|
||||||
import type { RunningChrome } from "./chrome.js";
|
import type { RunningChrome } from "./chrome.js";
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
vi.hoisted(() => {
|
||||||
|
vi.resetModules();
|
||||||
|
});
|
||||||
|
|
||||||
import { createBrowserRouteContext } from "./server-context.js";
|
import { createBrowserRouteContext } from "./server-context.js";
|
||||||
import type { BrowserServerState } from "./server-context.js";
|
import type { BrowserServerState } from "./server-context.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
vi.hoisted(() => {
|
||||||
|
vi.resetModules();
|
||||||
|
});
|
||||||
|
|
||||||
import "./server-context.chrome-test-harness.js";
|
import "./server-context.chrome-test-harness.js";
|
||||||
import * as chromeModule from "./chrome.js";
|
import * as chromeModule from "./chrome.js";
|
||||||
import { InvalidBrowserNavigationUrlError } from "./navigation-guard.js";
|
import { InvalidBrowserNavigationUrlError } from "./navigation-guard.js";
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
import { withFetchPreconnect } from "../test-utils/fetch-mock.js";
|
import { withFetchPreconnect } from "../test-utils/fetch-mock.js";
|
||||||
|
|
||||||
|
vi.hoisted(() => {
|
||||||
|
vi.resetModules();
|
||||||
|
});
|
||||||
|
|
||||||
import "./server-context.chrome-test-harness.js";
|
import "./server-context.chrome-test-harness.js";
|
||||||
import * as cdpModule from "./cdp.js";
|
import * as cdpModule from "./cdp.js";
|
||||||
import { InvalidBrowserNavigationUrlError } from "./navigation-guard.js";
|
import { InvalidBrowserNavigationUrlError } from "./navigation-guard.js";
|
||||||
|
|||||||
Reference in New Issue
Block a user