We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaf353e commit 6a7e969Copy full SHA for 6a7e969
1 file changed
test/index.js
@@ -95,6 +95,14 @@ test('handles short-option groups with "short" alias configured', () => {
95
assert.deepStrictEqual(result, expected);
96
});
97
98
+test('handles short-option followed by its value', () => {
99
+ const args = ['-fFILE'];
100
+ const options = { foo: { short: 'f', type: 'string' } };
101
+ const expected = { values: { __proto__: null, foo: 'FILE' }, positionals: [] };
102
+ const result = parseArgs({ strict: false, args, options });
103
+ assert.deepStrictEqual(result, expected);
104
+});
105
+
106
test('Everything after a bare `--` is considered a positional argument', () => {
107
const args = ['--', 'barepositionals', 'mopositionals'];
108
const expected = { values: { __proto__: null }, positionals: ['barepositionals', 'mopositionals'] };
0 commit comments