Skip to content

Commit

Permalink
Add test for unnormalizedFlags with aliases (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell committed Mar 20, 2023
1 parent 901b9fc commit dc0e33c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test.js
Expand Up @@ -665,6 +665,24 @@ test('aliases - works with short flag', t => {
});
});

test('aliases - unnormalized flags', t => {
t.deepEqual(meow({
importMeta,
argv: ['--foo=baz'],
flags: {
fooBar: {
type: 'string',
aliases: ['foo'],
shortFlag: 'f',
},
},
}).unnormalizedFlags, {
fooBar: 'baz',
foo: 'baz',
f: 'baz',
});
});

if (NODE_MAJOR_VERSION >= 14) {
test('supports es modules', async t => {
try {
Expand Down

0 comments on commit dc0e33c

Please sign in to comment.