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', () => {
9595 assert . deepStrictEqual ( result , expected ) ;
9696} ) ;
9797
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+
98106test ( 'Everything after a bare `--` is considered a positional argument' , ( ) => {
99107 const args = [ '--' , 'barepositionals' , 'mopositionals' ] ;
100108 const expected = { values : { __proto__ : null } , positionals : [ 'barepositionals' , 'mopositionals' ] } ;
You can’t perform that action at this time.
0 commit comments