mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
fix(test): reject group report flag values
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user