Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test that proves that grouped short-flags work fine
Closes #96
  • Loading branch information
sindresorhus committed Nov 5, 2018
1 parent 59773ee commit d2e0e1e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test.js
Expand Up @@ -174,3 +174,25 @@ test('accept help and options', t => {
f: true
});
});

test('grouped short-flags work', t => {
const cli = m({
argv: ['-cl'],
flags: {
coco: {
type: 'boolean',
alias: 'c'
},
loco: {
type: 'boolean',
alias: 'l'
}
}
});

const {flags} = cli;
t.true(flags.coco);
t.true(flags.loco);
t.true(flags.c);
t.true(flags.l);
});

0 comments on commit d2e0e1e

Please sign in to comment.