File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,14 @@ test('handles short-option groups with "short" alias configured', () => {
95
95
assert . deepStrictEqual ( result , expected ) ;
96
96
} ) ;
97
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
+
98
106
test ( 'Everything after a bare `--` is considered a positional argument' , ( ) => {
99
107
const args = [ '--' , 'barepositionals' , 'mopositionals' ] ;
100
108
const expected = { values : { __proto__ : null } , positionals : [ 'barepositionals' , 'mopositionals' ] } ;
You can’t perform that action at this time.
0 commit comments