mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 06:41:08 +00:00
perf: route contract test targets
This commit is contained in:
@@ -89,6 +89,41 @@ describe("test-projects args", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes top-level repo tests to the contracts config", () => {
|
||||
expect(buildVitestRunPlans(["test/appcast.test.ts"])).toEqual([
|
||||
{
|
||||
config: "vitest.contracts.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["test/appcast.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes contract tests to the contracts config", () => {
|
||||
expect(
|
||||
buildVitestRunPlans(["src/plugins/contracts/memory-embedding-provider.contract.test.ts"]),
|
||||
).toEqual([
|
||||
{
|
||||
config: "vitest.contracts.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["src/plugins/contracts/memory-embedding-provider.contract.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes config baseline integration tests to the contracts config", () => {
|
||||
expect(buildVitestRunPlans(["src/config/doc-baseline.integration.test.ts"])).toEqual([
|
||||
{
|
||||
config: "vitest.contracts.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["src/config/doc-baseline.integration.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes command targets to the commands config", () => {
|
||||
expect(buildVitestRunPlans(["src/commands/status.summary.test.ts"])).toEqual([
|
||||
{
|
||||
@@ -157,6 +192,17 @@ describe("test-projects args", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("widens top-level test helpers to sibling repo tests under contracts", () => {
|
||||
expect(buildVitestRunPlans(["test/helpers/temp-home.ts"])).toEqual([
|
||||
{
|
||||
config: "vitest.contracts.config.ts",
|
||||
forwardedArgs: [],
|
||||
includePatterns: ["test/helpers/**/*.test.ts"],
|
||||
watchMode: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("routes e2e targets straight to the e2e config", () => {
|
||||
expect(buildVitestRunPlans(["src/commands/models.set.e2e.test.ts"])).toEqual([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user