@@ -401,29 +401,29 @@ describe('namespaced options', () => {
401
401
strictEqual ( result . code , 0 ) ;
402
402
} ) ;
403
403
404
- it ( 'should override a non- namespaced option with a namespaced option ' , async ( ) => {
404
+ it ( 'should throw an error if a namespaced option has already been set in node options ' , async ( ) => {
405
405
const result = await spawnPromisified ( process . execPath , [
406
406
'--no-warnings' ,
407
407
'--expose-internals' ,
408
408
'--experimental-config-file' ,
409
- fixtures . path ( 'rc/override-namespace.json' ) ,
409
+ fixtures . path ( 'rc/override-node-option-with- namespace.json' ) ,
410
410
'-p' , 'require("internal/options").getOptionValue("--test-isolation")' ,
411
411
] ) ;
412
- strictEqual ( result . stderr , '' ) ;
413
- strictEqual ( result . stdout , 'process\n ' ) ;
414
- strictEqual ( result . code , 0 ) ;
412
+ match ( result . stderr , / O p t i o n - - t e s t - i s o l a t i o n i s a l r e a d y s e t i n n o d e O p t i o n s / ) ;
413
+ strictEqual ( result . stdout , '' ) ;
414
+ strictEqual ( result . code , 9 ) ;
415
415
} ) ;
416
416
417
- it ( 'should override a non-namespaced option with a namespaced option inverse order ' , async ( ) => {
417
+ it ( 'should throw an error if a node option has already been set in a namespaced option' , async ( ) => {
418
418
const result = await spawnPromisified ( process . execPath , [
419
419
'--no-warnings' ,
420
420
'--expose-internals' ,
421
421
'--experimental-config-file' ,
422
- fixtures . path ( 'rc/override-namespace-inverse .json' ) ,
422
+ fixtures . path ( 'rc/override-namespace.json' ) ,
423
423
'-p' , 'require("internal/options").getOptionValue("--test-isolation")' ,
424
424
] ) ;
425
- strictEqual ( result . stderr , '' ) ;
426
- strictEqual ( result . stdout , 'process\n ' ) ;
427
- strictEqual ( result . code , 0 ) ;
425
+ match ( result . stderr , / O p t i o n - - t e s t - i s o l a t i o n i s a l r e a d y s e t i n n a m e s p a c e o p t i o n s / ) ;
426
+ strictEqual ( result . stdout , '' ) ;
427
+ strictEqual ( result . code , 9 ) ;
428
428
} ) ;
429
429
} ) ;
0 commit comments