fix(tests): preload budget workers through portable file URLs (#11764)

This commit is contained in:
RRFZ authored and GitHub committed 2026-11-18 22:33:31 +08:00
1 parent 7b02fec30b
commit 146b4f1202
2 files changed
+4 -4

No files matched your search

@@ -1,6 +1,6 @@
import { createRequire } from "node:module";
import { writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { fileURLToPath, pathToFileURL } from "node:url";
import { join } from "node:path";
import { expect, it, onTestFinished } from "vitest";
import { WebNetworkCaptureService } from "../../application/WebNetworkCaptureService.js";
@@ -27,7 +27,7 @@ const service = () =>
command: process.execPath,
arguments: [
"--import",
require.resolve("tsx"),
pathToFileURL(require.resolve("tsx")).href,
fileURLToPath(
new URL("./NodeCaptureProcess.ts", import.meta.url),
),
+2 -2
View File
@@ -1,6 +1,6 @@
import { createRequire } from "node:module";
import { readFile, writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { fileURLToPath, pathToFileURL } from "node:url";
import { join } from "node:path";
import { expect, it } from "vitest";
import { selectedEvmProducerLimits } from "../domain/evm/evmInterface.js";
@@ -33,7 +33,7 @@ it("recovers complete EVMole worker evidence for the same carrier after raising
command: process.execPath,
arguments: [
"--import",
require.resolve("tsx"),
pathToFileURL(require.resolve("tsx")).href,
"--max-old-space-size=256",
"--disable-wasm-trap-handler",
fileURLToPath(new URL("./EvmoleInterfaceWorker.ts", import.meta.url)),