fix(test): reject malformed group report numeric flags

This commit is contained in:
Vincent Koc
2026-06-02 21:31:16 +02:00
parent 661c763b28
commit 28b1ea7c0d
2 changed files with 25 additions and 11 deletions
+18
View File
@@ -319,6 +319,24 @@ describe("scripts/test-group-report arg parsing", () => {
timeoutMs: 5000,
});
});
it("rejects malformed positive integer flags", () => {
for (const flag of [
"--limit",
"--top-files",
"--max-test-ms",
"--timeout-ms",
"--kill-grace-ms",
"--concurrency",
]) {
expect(() => parseTestGroupReportArgs([flag, "20x"])).toThrow(
`${flag} must be a positive integer`,
);
expect(() => parseTestGroupReportArgs([flag, "0"])).toThrow(
`${flag} must be a positive integer`,
);
}
});
});
describe("scripts/test-group-report child process guard", () => {