Skip to content

Commit 90d4962

Browse files
committed
test(ci): cover wrong_base plus bad_description together
1 parent a9cafc4 commit 90d4962

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/scripts/pr-quality.test.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ describe("collectPrQualityFailures", () => {
102102
assert.ok(!failures.some((f) => f.code === "wrong_ancestry"));
103103
});
104104

105+
it("reports wrong_base and bad_description together for main + empty body", () => {
106+
const failures = collectPrQualityFailures({
107+
baseRef: "main",
108+
allowedBases: allowed,
109+
body: "",
110+
behindMain: 0,
111+
behindBase: 0,
112+
authorPermission: "read",
113+
});
114+
assert.ok(failures.some((f) => f.code === "wrong_base"));
115+
assert.ok(failures.some((f) => f.code === "bad_description"));
116+
assert.ok(!failures.some((f) => f.code === "wrong_ancestry"));
117+
});
118+
105119
it("reports wrong_ancestry for contributor on #644-shaped compare", () => {
106120
const failures = collectPrQualityFailures({
107121
baseRef: "dev",

0 commit comments

Comments
 (0)