mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
perf(test): default to vmForks on Node 25; unstub envs
This commit is contained in:
@@ -35,7 +35,10 @@ const isMacOS = process.platform === "darwin" || process.env.RUNNER_OS === "macO
|
||||
const isWindows = process.platform === "win32" || process.env.RUNNER_OS === "Windows";
|
||||
const isWindowsCi = isCI && isWindows;
|
||||
const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "", 10);
|
||||
const supportsVmForks = Number.isFinite(nodeMajor) ? nodeMajor < 24 : true;
|
||||
// vmForks is a big win for transform/import heavy suites, but Node 24 had
|
||||
// regressions with Vitest's vm runtime in this repo. Keep it opt-out via
|
||||
// OPENCLAW_TEST_VM_FORKS=0, and let users force-enable with =1.
|
||||
const supportsVmForks = Number.isFinite(nodeMajor) ? nodeMajor !== 24 : true;
|
||||
const useVmForks =
|
||||
process.env.OPENCLAW_TEST_VM_FORKS === "1" ||
|
||||
(process.env.OPENCLAW_TEST_VM_FORKS !== "0" && !isWindows && supportsVmForks);
|
||||
|
||||
Reference in New Issue
Block a user