@@ -371,6 +371,34 @@ test('should use node.config.json as default', onlyIfNodeOptionsSupport, async (
371371 assert . strictEqual ( result . code , 0 ) ;
372372} ) ;
373373
374+ test ( 'should use node.config.json when --experimental-config-file has no argument' ,
375+ onlyIfNodeOptionsSupport , async ( ) => {
376+ const result = await spawnPromisified ( process . execPath , [
377+ '--no-warnings' ,
378+ '--experimental-config-file' ,
379+ '-p' , 'http.maxHeaderSize' ,
380+ ] , {
381+ cwd : fixtures . path ( 'rc/default' ) ,
382+ } ) ;
383+ assert . strictEqual ( result . stderr , '' ) ;
384+ assert . strictEqual ( result . stdout , '10\n' ) ;
385+ assert . strictEqual ( result . code , 0 ) ;
386+ } ) ;
387+
388+ test ( 'should use node.config.json when --experimental-config-file= has empty argument' ,
389+ onlyIfNodeOptionsSupport , async ( ) => {
390+ const result = await spawnPromisified ( process . execPath , [
391+ '--no-warnings' ,
392+ '--experimental-config-file=' ,
393+ '-p' , 'http.maxHeaderSize' ,
394+ ] , {
395+ cwd : fixtures . path ( 'rc/default' ) ,
396+ } ) ;
397+ assert . strictEqual ( result . stderr , '' ) ;
398+ assert . strictEqual ( result . stdout , '10\n' ) ;
399+ assert . strictEqual ( result . code , 0 ) ;
400+ } ) ;
401+
374402test ( 'should override node.config.json when specificied' , onlyIfNodeOptionsSupport , async ( ) => {
375403 const result = await spawnPromisified ( process . execPath , [
376404 '--no-warnings' ,
0 commit comments