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