Skip to content

Commit 9a5cdd8

Browse files
committed
Improve test for unrecognized options
Yargs 7 changed the error format and the test no longer passed. Improve the test to avoid relying on the error format. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
1 parent 4064c5a commit 9a5cdd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/swagger-spec-validator-cmd.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ describe('swagger-spec-validator command', function() {
313313
expectArgsResult(['-u'], 3, null, /missing|not enough/i);
314314
expectArgsResult(['--url'], 3, null, /missing|not enough/i);
315315
expectArgsResult(
316-
['--unknown'],
316+
['--badtestopt'],
317317
3,
318318
null,
319-
/\b(unknown|recognized|unsupported)\b.+--unknown\b/i
319+
/\bbadtestopt\b/i
320320
);
321321

322322
expectArgsResult(['--help'], 0, /usage/i, null);

0 commit comments

Comments
 (0)