@@ -91,7 +91,7 @@ test('short option group does not consume subsequent positional', (t) => {
91
91
t . end ( ) ;
92
92
} ) ;
93
93
94
- // // See: Guideline 5 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
94
+ // See: Guideline 5 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
95
95
test ( 'if terminal of short-option group configured `type: "string"`, subsequent positional is stored' , ( t ) => {
96
96
const passedArgs = [ '-rvf' , 'foo' ] ;
97
97
const passedOptions = { f : { type : 'string' } } ;
@@ -249,7 +249,7 @@ test('when expecting `multiple:true` boolean option and option used multiple tim
249
249
t . end ( ) ;
250
250
} ) ;
251
251
252
- test ( 'order of option and positional does not matter (per README)' , function ( t ) {
252
+ test ( 'order of option and positional does not matter (per README)' , ( t ) => {
253
253
const passedArgs1 = [ '--foo=bar' , 'baz' ] ;
254
254
const passedArgs2 = [ 'baz' , '--foo=bar' ] ;
255
255
const passedOptions = { foo : { type : 'string' } } ;
@@ -362,17 +362,17 @@ test('invalid argument passed for options', (t) => {
362
362
const passedArgs = [ '--so=wat' ] ;
363
363
const passedOptions = 'bad value' ;
364
364
365
- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
365
+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
366
366
code : 'ERR_INVALID_ARG_TYPE'
367
367
} ) ;
368
368
369
369
t . end ( ) ;
370
370
} ) ;
371
371
372
- test ( 'then type property missing for option then throw' , function ( t ) {
372
+ test ( 'then type property missing for option then throw' , ( t ) => {
373
373
const knownOptions = { foo : { } } ;
374
374
375
- t . throws ( function ( ) { parseArgs ( { options : knownOptions } ) ; } , {
375
+ t . throws ( ( ) => { parseArgs ( { options : knownOptions } ) ; } , {
376
376
code : 'ERR_INVALID_ARG_TYPE'
377
377
} ) ;
378
378
@@ -383,7 +383,7 @@ test('boolean passed to "type" option', (t) => {
383
383
const passedArgs = [ '--so=wat' ] ;
384
384
const passedOptions = { foo : { type : true } } ;
385
385
386
- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
386
+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
387
387
code : 'ERR_INVALID_ARG_TYPE'
388
388
} ) ;
389
389
@@ -394,7 +394,7 @@ test('invalid union value passed to "type" option', (t) => {
394
394
const passedArgs = [ '--so=wat' ] ;
395
395
const passedOptions = { foo : { type : 'str' } } ;
396
396
397
- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
397
+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
398
398
code : 'ERR_INVALID_ARG_TYPE'
399
399
} ) ;
400
400
@@ -405,7 +405,7 @@ test('invalid short option length', (t) => {
405
405
const passedArgs = [ ] ;
406
406
const passedOptions = { foo : { short : 'fo' , type : 'boolean' } } ;
407
407
408
- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
408
+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
409
409
code : 'ERR_INVALID_ARG_VALUE'
410
410
} ) ;
411
411
0 commit comments