Skip to content

Commit

Permalink
Merge branch 'master' into release-v15.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Oct 31, 2019
2 parents 5a5f0c8 + 445bc58 commit bdb62ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -75,6 +75,6 @@
],
"license": "MIT",
"engine": {
"node": ">=6"
"node": ">=8"
}
}
13 changes: 13 additions & 0 deletions test/validation.js
Expand Up @@ -848,6 +848,19 @@ describe('validation tests', () => {
args.foo.should.equal(true)
args.bar.should.equal(true)
})

it('does not fail when unrecognized option is passed after --', () => {
const args = yargs('ahoy ben -- --arrr')
.strict()
.command('ahoy <matey>', 'piratical courtesy')
.option('arrr', { boolean: true, describe: false })
.fail((msg) => {
expect.fail(msg)
})
.parse()
args.matey.should.equal('ben')
args._.should.deep.equal(['ahoy', '--arrr'])
})
})

describe('demandOption', () => {
Expand Down

0 comments on commit bdb62ec

Please sign in to comment.