Skip to content

Commit

Permalink
fix: test case checking for unknown sub-command options doesn't work …
Browse files Browse the repository at this point in the history
…as expected
  • Loading branch information
shubheksha committed Sep 8, 2016
1 parent 45d9c0d commit 983e7a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test.program.js
Expand Up @@ -216,13 +216,13 @@ describe('program.Program', () => {
});

it('throws an error about unknown sub-command options', () => {
const program = new Program(['thing --nope'])
const program = new Program(['thing', '--nope'])
.command('thing', '', () => {});
return run(program)
.then(makeSureItFails())
.catch((error) => {
// Again, yargs calls this an argument not an option for some reason.
assert.match(error.message, /Unknown argument: thing --nope/);
assert.match(error.message, /Unknown argument: nope/);
});
});

Expand Down

0 comments on commit 983e7a3

Please sign in to comment.