Skip to content

Commit

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

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

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

0 comments on commit 23eeb54

Please sign in to comment.