mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
fix: honor test planner cache paths by target platform
This commit is contained in:
@@ -146,7 +146,8 @@ export const resolveVitestFsModuleCachePath = ({
|
||||
if (explicitPath) {
|
||||
return explicitPath;
|
||||
}
|
||||
return path.join(
|
||||
const pathImpl = isWindowsEnv(env, platform) ? path.win32 : path.posix;
|
||||
return pathImpl.join(
|
||||
cwd,
|
||||
"node_modules",
|
||||
".experimental-vitest-cache",
|
||||
|
||||
@@ -421,6 +421,19 @@ describe("resolveVitestFsModuleCachePath", () => {
|
||||
).toBe("/repo/node_modules/.experimental-vitest-cache/unit-fast-1");
|
||||
});
|
||||
|
||||
it("honors the requested Windows platform when building the cache path", () => {
|
||||
expect(
|
||||
resolveVitestFsModuleCachePath({
|
||||
cwd: "/repo",
|
||||
env: {
|
||||
OPENCLAW_VITEST_FS_MODULE_CACHE: "1",
|
||||
},
|
||||
platform: "win32",
|
||||
unitId: "unit-fast-1",
|
||||
}),
|
||||
).toBe("\\repo\\node_modules\\.experimental-vitest-cache\\unit-fast-1");
|
||||
});
|
||||
|
||||
it("respects an explicit cache path override", () => {
|
||||
expect(
|
||||
resolveVitestFsModuleCachePath({
|
||||
|
||||
Reference in New Issue
Block a user