@@ -91,7 +91,7 @@ test('short option group does not consume subsequent positional', (t) => {
9191 t . end ( ) ;
9292} ) ;
9393
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
9595test ( 'if terminal of short-option group configured `type: "string"`, subsequent positional is stored' , ( t ) => {
9696 const passedArgs = [ '-rvf' , 'foo' ] ;
9797 const passedOptions = { f : { type : 'string' } } ;
@@ -249,7 +249,7 @@ test('when expecting `multiple:true` boolean option and option used multiple tim
249249 t . end ( ) ;
250250} ) ;
251251
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 ) => {
253253 const passedArgs1 = [ '--foo=bar' , 'baz' ] ;
254254 const passedArgs2 = [ 'baz' , '--foo=bar' ] ;
255255 const passedOptions = { foo : { type : 'string' } } ;
@@ -362,17 +362,17 @@ test('invalid argument passed for options', (t) => {
362362 const passedArgs = [ '--so=wat' ] ;
363363 const passedOptions = 'bad value' ;
364364
365- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
365+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
366366 code : 'ERR_INVALID_ARG_TYPE'
367367 } ) ;
368368
369369 t . end ( ) ;
370370} ) ;
371371
372- test ( 'then type property missing for option then throw' , function ( t ) {
372+ test ( 'then type property missing for option then throw' , ( t ) => {
373373 const knownOptions = { foo : { } } ;
374374
375- t . throws ( function ( ) { parseArgs ( { options : knownOptions } ) ; } , {
375+ t . throws ( ( ) => { parseArgs ( { options : knownOptions } ) ; } , {
376376 code : 'ERR_INVALID_ARG_TYPE'
377377 } ) ;
378378
@@ -383,7 +383,7 @@ test('boolean passed to "type" option', (t) => {
383383 const passedArgs = [ '--so=wat' ] ;
384384 const passedOptions = { foo : { type : true } } ;
385385
386- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
386+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
387387 code : 'ERR_INVALID_ARG_TYPE'
388388 } ) ;
389389
@@ -394,7 +394,7 @@ test('invalid union value passed to "type" option', (t) => {
394394 const passedArgs = [ '--so=wat' ] ;
395395 const passedOptions = { foo : { type : 'str' } } ;
396396
397- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
397+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
398398 code : 'ERR_INVALID_ARG_TYPE'
399399 } ) ;
400400
@@ -405,7 +405,7 @@ test('invalid short option length', (t) => {
405405 const passedArgs = [ ] ;
406406 const passedOptions = { foo : { short : 'fo' , type : 'boolean' } } ;
407407
408- t . throws ( function ( ) { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
408+ t . throws ( ( ) => { parseArgs ( { args : passedArgs , options : passedOptions } ) ; } , {
409409 code : 'ERR_INVALID_ARG_VALUE'
410410 } ) ;
411411
0 commit comments