fix(test): reject missing group report values

This commit is contained in:
Vincent Koc
2026-06-06 22:09:33 +02:00
parent 53044e8717
commit 4bce355318
2 changed files with 28 additions and 6 deletions
+14
View File
@@ -389,6 +389,20 @@ describe("scripts/test-group-report arg parsing", () => {
);
}
});
it("rejects missing report path and config option values", () => {
for (const flag of ["--config", "--report", "--group-by", "--output"]) {
expect(() => parseTestGroupReportArgs([flag, "--limit", "5"])).toThrow(
`${flag} requires a value`,
);
}
expect(() => parseTestGroupReportArgs(["--compare", "before.json", "--limit"])).toThrow(
"--compare requires a value",
);
expect(() => parseTestGroupReportArgs(["--compare", "--limit", "5"])).toThrow(
"--compare requires a value",
);
});
});
describe("scripts/test-group-report child process guard", () => {