Skip to content

Commit

Permalink
WIP: add test to reproduce #267
Browse files Browse the repository at this point in the history
  • Loading branch information
mleguen committed Apr 15, 2020
1 parent 78014fc commit f866edc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/yargs-parser.js
Expand Up @@ -959,6 +959,19 @@ describe('yargs-parser', function () {
})

argv.f.bar.should.eql(99)
argv.foo.bar.should.eql(99)
})

it('should populate aliases when dot notation is used on camel-cased option', function () {
var argv = parser(['--foo-baz.bar', '99'], {
alias: {
'foo-baz': ['f']
}
})

argv.f.bar.should.eql(99)
argv['foo-baz'].bar.should.eql(99)
argv.fooBaz.bar.should.eql(99)
})

it('should populate aliases when nested dot notation is used', function () {
Expand Down

0 comments on commit f866edc

Please sign in to comment.