Skip to content

Commit

Permalink
Tests: add test for default for boolean using alias
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn committed Mar 18, 2023
1 parent cc5ec96 commit 5dbc8ae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/bool.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,19 @@ test('boolean using something similar to true', function (t) {
t.same(result, expected);
t.end();
});

test('supplied default for boolean using alias', function (t) {
var argv = parse(['moo'], {
boolean: ['bool'],
alias: { bool: 'b' },
default: { b: true },
});

t.deepEqual(argv, {
bool: true,
b: true,
_: ['moo'],
});

t.end();
});

0 comments on commit 5dbc8ae

Please sign in to comment.