Skip to content

Commit

Permalink
additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Jul 25, 2019
1 parent 8f5cfdf commit 7ec05e7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/yargs-parser.js
Expand Up @@ -1457,6 +1457,18 @@ describe('yargs-parser', function () {
], { count: 'v' })
parsed.v.should.equal(8)
})

it('should increment and ignore array/narg settings', function () {
var parsed = parser(['-v', 'foo', '-v', 'bar', '-u', 'baz', '-v', '-u'], {
array: ['varr'],
narg: { 'uarr': 1 },
count: ['v', 'u'],
alias: { v: 'varr', u: 'uarr' }
})
parsed._.should.deep.equal(['foo', 'bar', 'baz'])
parsed.v.should.equal(3)
parsed.u.should.equal(2)
})
})

describe('array', function () {
Expand Down

0 comments on commit 7ec05e7

Please sign in to comment.