mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
test: move root contract fixture
This commit is contained in:
@@ -58,7 +58,7 @@ private enum TalkConfigContractFixtureLoader {
|
||||
private static func findFixtureURL(startingAt fileURL: URL) throws -> URL {
|
||||
var directory = fileURL.deletingLastPathComponent()
|
||||
while directory.path != "/" {
|
||||
let candidate = directory.appendingPathComponent("test-fixtures/talk-config-contract.json")
|
||||
let candidate = directory.appendingPathComponent("test/fixtures/talk-config-contract.json")
|
||||
if FileManager.default.fileExists(atPath: candidate.path) {
|
||||
return candidate
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ export function detectChangedLanes(changedPaths, options = {}) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (changedPath.startsWith("test/")) {
|
||||
if (changedPath.startsWith("test/") || changedPath.startsWith("test-fixtures/")) {
|
||||
lanes.tooling = true;
|
||||
reasons.push(`${changedPath}: root test/support surface`);
|
||||
continue;
|
||||
|
||||
@@ -30,7 +30,7 @@ type TalkConfigContractFixture = {
|
||||
timeoutCases: TimeoutContractCase[];
|
||||
};
|
||||
|
||||
const fixturePath = new URL("../../../test-fixtures/talk-config-contract.json", import.meta.url);
|
||||
const fixturePath = new URL("../../../test/fixtures/talk-config-contract.json", import.meta.url);
|
||||
const fixtures = JSON.parse(fs.readFileSync(fixturePath, "utf-8")) as TalkConfigContractFixture;
|
||||
|
||||
describe("talk.config contract fixtures", () => {
|
||||
|
||||
@@ -743,7 +743,10 @@ describe("scripts/changed-lanes", () => {
|
||||
});
|
||||
|
||||
it("routes root test/support changes to the tooling test lane instead of all lanes", () => {
|
||||
const result = detectChangedLanes(["test/git-hooks-pre-commit.test.ts"]);
|
||||
const result = detectChangedLanes([
|
||||
"test/git-hooks-pre-commit.test.ts",
|
||||
"test-fixtures/legacy-root-fixture.json",
|
||||
]);
|
||||
const plan = createChangedCheckPlan(result);
|
||||
|
||||
expect(result.lanes).toMatchObject({
|
||||
|
||||
Reference in New Issue
Block a user