fix(test): keep local Vitest checks serialized

This commit is contained in:
Vincent Koc
2026-04-25 03:05:28 -07:00
parent 5e0cca5e24
commit 814409a3b3
8 changed files with 144 additions and 72 deletions

View File

@@ -58,6 +58,38 @@ describe("scripts/run-vitest", () => {
});
});
it("reenables local check policy for local Vitest children", () => {
expect(
resolveVitestSpawnParams(
{
OPENCLAW_LOCAL_CHECK: "0",
PATH: "/usr/bin",
},
"darwin",
).env,
).toMatchObject({
OPENCLAW_LOCAL_CHECK: "1",
PATH: "/usr/bin",
});
});
it("preserves explicit local-check disablement in CI", () => {
expect(
resolveVitestSpawnParams(
{
CI: "true",
OPENCLAW_LOCAL_CHECK: "0",
PATH: "/usr/bin",
},
"linux",
).env,
).toMatchObject({
CI: "true",
OPENCLAW_LOCAL_CHECK: "0",
PATH: "/usr/bin",
});
});
it("caps native Rust worker pools for serial Vitest runs", () => {
expect(
resolveVitestSpawnParams(