Skip to content

Conversation

tommy-mitchell
Copy link
Contributor

Adds a test case to make sure that cli.unnormalizedFlags works correctly with the new aliases option:

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',
	});
});

@sindresorhus sindresorhus merged commit dc0e33c into sindresorhus:main Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants