mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 10:00:21 +00:00
chore: update dependencies and oxc tooling
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
applyParallelVitestCachePaths,
|
||||
buildFullSuiteVitestRunPlans,
|
||||
buildVitestRunPlans,
|
||||
resolveChangedTargetArgs,
|
||||
@@ -488,3 +490,43 @@ describe("scripts/test-projects full-suite sharding", () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("scripts/test-projects parallel cache paths", () => {
|
||||
it("assigns isolated Vitest fs-module cache paths per parallel shard", () => {
|
||||
const specs = applyParallelVitestCachePaths(
|
||||
[
|
||||
{ config: "test/vitest/vitest.gateway.config.ts", env: {}, pnpmArgs: [] },
|
||||
{ config: "test/vitest/vitest.extension-matrix.config.ts", env: {}, pnpmArgs: [] },
|
||||
],
|
||||
{ cwd: "/repo", env: {} },
|
||||
);
|
||||
|
||||
expect(specs.map((spec) => spec.env)).toEqual([
|
||||
{
|
||||
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: path.join(
|
||||
"/repo",
|
||||
"node_modules",
|
||||
".experimental-vitest-cache",
|
||||
"0-test-vitest-vitest.gateway.config.ts",
|
||||
),
|
||||
},
|
||||
{
|
||||
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: path.join(
|
||||
"/repo",
|
||||
"node_modules",
|
||||
".experimental-vitest-cache",
|
||||
"1-test-vitest-vitest.extension-matrix.config.ts",
|
||||
),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps an explicit global cache path", () => {
|
||||
const [spec] = applyParallelVitestCachePaths(
|
||||
[{ config: "test/vitest/vitest.gateway.config.ts", env: {}, pnpmArgs: [] }],
|
||||
{ cwd: "/repo", env: { OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: "/tmp/cache" } },
|
||||
);
|
||||
|
||||
expect(spec?.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user