Skip to content

Instantly share code, notes, and snippets.

@rpl
Created September 8, 2016 14:29
Show Gist options
  • Save rpl/1fd15005c2e97f17ba7f0bb404f41394 to your computer and use it in GitHub Desktop.
Save rpl/1fd15005c2e97f17ba7f0bb404f41394 to your computer and use it in GitHub Desktop.
fix web-ext test
it('throws an error about unknown sub-command options', () => {
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: --nope/);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment