mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 04:10:22 +00:00
test: default vitest root projects to threads
This commit is contained in:
@@ -146,7 +146,9 @@ describe("scripts/test-extension.mjs", () => {
|
||||
resolveExtensionTestPlan({ cwd: process.cwd(), targetArg: extensionId }).hasTests,
|
||||
);
|
||||
|
||||
expect(uniqueAssigned.toSorted((left, right) => left.localeCompare(right))).toEqual(expected);
|
||||
expect(uniqueAssigned.toSorted((left, right) => left.localeCompare(right))).toEqual(
|
||||
expected.toSorted((left, right) => left.localeCompare(right)),
|
||||
);
|
||||
expect(assigned).toHaveLength(expected.length);
|
||||
|
||||
const totals = shards.map((shard) => shard.testFileCount);
|
||||
|
||||
@@ -1,8 +1,26 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { createAgentsVitestConfig } from "../vitest.agents.config.ts";
|
||||
import { createCommandsVitestConfig } from "../vitest.commands.config.ts";
|
||||
import baseConfig, { rootVitestProjects } from "../vitest.config.ts";
|
||||
import { createGatewayVitestConfig } from "../vitest.gateway.config.ts";
|
||||
import { createUiVitestConfig } from "../vitest.ui.config.ts";
|
||||
|
||||
describe("projects vitest config", () => {
|
||||
it("defines the native root project list for all non-live Vitest lanes", () => {
|
||||
expect(baseConfig.test?.projects).toEqual([...rootVitestProjects]);
|
||||
});
|
||||
|
||||
it("keeps hard thread exceptions on forks", () => {
|
||||
expect(createGatewayVitestConfig().test.pool).toBe("forks");
|
||||
expect(createAgentsVitestConfig().test.pool).toBe("forks");
|
||||
expect(createCommandsVitestConfig().test.pool).toBe("forks");
|
||||
});
|
||||
|
||||
it("keeps the root ui lane aligned with the jsdom ui project setup", () => {
|
||||
const config = createUiVitestConfig();
|
||||
expect(config.test.environment).toBe("jsdom");
|
||||
expect(config.test.isolate).toBe(true);
|
||||
expect(config.test.runner).toBeUndefined();
|
||||
expect(config.test.setupFiles).toContain("ui/src/test-helpers/lit-warnings.setup.ts");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user