@@ -479,21 +479,23 @@ describe('cli args parsing', () => {
479479 } ) ,
480480 'cd4a.test.config.mixed.json' ,
481481 ) ;
482- const args = parseArguments ( [ '--config' , testConfig . path ] ) ;
483- assert . strictEqual ( args . config , testConfig . path ) ;
484- assert . strictEqual ( args . categoryMemory , true ) ;
482+ assert . throws (
483+ ( ) => parseArguments ( [ '--config' , testConfig . path ] ) ,
484+ / I n v a l i d J S O N c o n f i g f i l e : U n k n o w n a r g u m e n t : n o - c a t e g o r y - m e m o r y / ,
485+ ) ;
485486 } ) ;
486487
487- it ( 'parses config should allow dashed property` ' , async ( ) => {
488+ it ( 'parses config should not allow dashed property' , async ( ) => {
488489 using testConfig = createTempFile (
489490 JSON . stringify ( {
490491 headless : true ,
491492 'category-memory' : false ,
492493 } ) ,
493494 'cd4a.test.config.mixed.json' ,
494495 ) ;
495- const args = parseArguments ( [ '--config' , testConfig . path ] ) ;
496- assert . strictEqual ( args . config , testConfig . path ) ;
497- assert . strictEqual ( args . categoryMemory , false ) ;
496+ assert . throws (
497+ ( ) => parseArguments ( [ '--config' , testConfig . path ] ) ,
498+ / I n v a l i d J S O N c o n f i g f i l e : U n k n o w n a r g u m e n t : c a t e g o r y - m e m o r y / ,
499+ ) ;
498500 } ) ;
499501} ) ;
0 commit comments