We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12c82e6 commit 52d875aCopy full SHA for 52d875a
test/validation.js
@@ -848,6 +848,19 @@ describe('validation tests', () => {
848
args.foo.should.equal(true)
849
args.bar.should.equal(true)
850
})
851
+
852
+ it('does not fail when unrecognized option is passed after --', () => {
853
+ const args = yargs('ahoy ben -- --arrr')
854
+ .strict()
855
+ .command('ahoy <matey>', 'piratical courtesy')
856
+ .option('arrr', { boolean: true, describe: false })
857
+ .fail((msg) => {
858
+ expect.fail(msg)
859
+ })
860
+ .parse()
861
+ args.matey.should.equal('ben')
862
+ args._.should.deep.equal(['ahoy', '--arrr'])
863
864
865
866
describe('demandOption', () => {
0 commit comments