mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 11:40:22 +00:00
fix(regression): route contract paths through test wrapper
This commit is contained in:
@@ -5,6 +5,7 @@ import { isUnitConfigTestFile } from "../../vitest.unit-paths.mjs";
|
||||
import { dedupeFilesPreserveOrder, loadTestRunnerBehavior } from "../test-runner-manifest.mjs";
|
||||
|
||||
const baseConfigPrefixes = ["src/agents/", "src/auto-reply/", "src/commands/", "test/", "ui/"];
|
||||
const contractTestPrefixes = ["src/channels/plugins/contracts/", "src/plugins/contracts/"];
|
||||
|
||||
export const normalizeRepoPath = (value) => value.split(path.sep).join("/");
|
||||
|
||||
@@ -96,6 +97,8 @@ export function loadTestCatalog() {
|
||||
let surface = "base";
|
||||
if (isUnitConfigTestFile(normalizedFile)) {
|
||||
surface = "unit";
|
||||
} else if (contractTestPrefixes.some((prefix) => normalizedFile.startsWith(prefix))) {
|
||||
surface = "contracts";
|
||||
} else if (normalizedFile.endsWith(".live.test.ts")) {
|
||||
surface = "live";
|
||||
} else if (normalizedFile.endsWith(".e2e.test.ts")) {
|
||||
@@ -185,4 +188,13 @@ export function loadTestCatalog() {
|
||||
};
|
||||
}
|
||||
|
||||
export const testSurfaces = ["unit", "extensions", "channels", "gateway", "live", "e2e", "base"];
|
||||
export const testSurfaces = [
|
||||
"unit",
|
||||
"extensions",
|
||||
"channels",
|
||||
"contracts",
|
||||
"gateway",
|
||||
"live",
|
||||
"e2e",
|
||||
"base",
|
||||
];
|
||||
|
||||
@@ -782,6 +782,16 @@ const createTargetedUnit = (context, classification, filters) => {
|
||||
...filters,
|
||||
];
|
||||
}
|
||||
if (owner === "contracts") {
|
||||
return [
|
||||
"vitest",
|
||||
"run",
|
||||
"--config",
|
||||
"vitest.contracts.config.ts",
|
||||
...context.noIsolateArgs,
|
||||
...filters,
|
||||
];
|
||||
}
|
||||
if (owner === "live") {
|
||||
return [
|
||||
"vitest",
|
||||
|
||||
Reference in New Issue
Block a user