From 8086cffd172e79c7cb7326c2e838db30abc3d34d Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 21 Jun 2026 19:56:25 +0200 Subject: [PATCH] fix(test): reject group report flag values --- scripts/test-group-report.mjs | 2 +- test/scripts/test-group-report.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test-group-report.mjs b/scripts/test-group-report.mjs index 81baed79d53b..06c8f5810a10 100644 --- a/scripts/test-group-report.mjs +++ b/scripts/test-group-report.mjs @@ -64,7 +64,7 @@ function usage() { function readRequiredValue(argv, index, flag) { const value = argv[index + 1]; - if (!value || value.startsWith("--")) { + if (!value || value.startsWith("-")) { throw new Error(`${flag} requires a value`); } return value; diff --git a/test/scripts/test-group-report.test.ts b/test/scripts/test-group-report.test.ts index 0065c69ce79b..5186d5d4146a 100644 --- a/test/scripts/test-group-report.test.ts +++ b/test/scripts/test-group-report.test.ts @@ -592,6 +592,7 @@ describe("scripts/test-group-report arg parsing", () => { expect(() => parseTestGroupReportArgs([flag, "--limit", "5"])).toThrow( `${flag} requires a value`, ); + expect(() => parseTestGroupReportArgs([flag, "-h"])).toThrow(`${flag} requires a value`); } for (const flag of [ "--limit",