fix(ci): harden changed extension diff fallback

This commit is contained in:
Peter Steinberger
2026-03-23 04:40:37 +00:00
parent 7909236bd1
commit 7818344f82
3 changed files with 82 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import { describe, expect, it } from "vitest";
import {
detectChangedExtensionIds,
listAvailableExtensionIds,
listChangedExtensionIds,
resolveExtensionTestPlan,
} from "../../scripts/test-extension.mjs";
@@ -79,6 +80,15 @@ describe("scripts/test-extension.mjs", () => {
);
});
it("can fail safe to all extensions when the base revision is unavailable", () => {
const extensionIds = listChangedExtensionIds({
base: "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
unavailableBaseBehavior: "all",
});
expect(extensionIds).toEqual(listAvailableExtensionIds());
});
it("dry-run still reports a plan for extensions without tests", () => {
const plan = readPlan(["copilot-proxy"]);