mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
build: refresh deps and vitest cache lanes
This commit is contained in:
@@ -4,6 +4,7 @@ import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
createExecutionArtifacts,
|
||||
resolvePnpmCommandInvocation,
|
||||
resolveVitestFsModuleCachePath,
|
||||
} from "../../scripts/test-planner/executor.mjs";
|
||||
import {
|
||||
buildCIExecutionManifest,
|
||||
@@ -375,3 +376,42 @@ describe("resolvePnpmCommandInvocation", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveVitestFsModuleCachePath", () => {
|
||||
it("uses a lane-local cache path by default on non-Windows hosts", () => {
|
||||
expect(
|
||||
resolveVitestFsModuleCachePath({
|
||||
cwd: "/repo",
|
||||
env: {},
|
||||
platform: "linux",
|
||||
unitId: "unit-fast-1",
|
||||
}),
|
||||
).toBe("/repo/node_modules/.experimental-vitest-cache/unit-fast-1");
|
||||
});
|
||||
|
||||
it("respects an explicit cache path override", () => {
|
||||
expect(
|
||||
resolveVitestFsModuleCachePath({
|
||||
cwd: "/repo",
|
||||
env: {
|
||||
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: "/tmp/custom-vitest-cache",
|
||||
},
|
||||
platform: "linux",
|
||||
unitId: "unit-fast-1",
|
||||
}),
|
||||
).toBe("/tmp/custom-vitest-cache");
|
||||
});
|
||||
|
||||
it("does not force a cache path when the cache is disabled", () => {
|
||||
expect(
|
||||
resolveVitestFsModuleCachePath({
|
||||
cwd: "/repo",
|
||||
env: {
|
||||
OPENCLAW_VITEST_FS_MODULE_CACHE: "0",
|
||||
},
|
||||
platform: "linux",
|
||||
unitId: "unit-fast-1",
|
||||
}),
|
||||
).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user