test: move root contract fixture

This commit is contained in:
Peter Steinberger
2026-05-03 12:48:12 +01:00
parent c1b9af2770
commit b8a4d6a58a
5 changed files with 7 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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;

View File

@@ -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", () => {

View File

@@ -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({