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 9174eee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/yargs-parser.js
Expand Up @@ -959,6 +959,20 @@ describe('yargs-parser', function () {
})

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

// see #267
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 9174eee

Please sign in to comment.