@@ -307,9 +307,9 @@ console.log(values.random);
307307 const file = createTmpFile ( ) ;
308308 const required = createTmpFile ( 'process._rawDebug(\'pid\', process.pid);' ) ;
309309 const args = [ '--require' , required , file ] ;
310- const { stdout, pid } = await runWriteSucceed ( { file, watchedFile : file , args } ) ;
310+ const { stdout, pid, stderr } = await runWriteSucceed ( { file, watchedFile : file , args } ) ;
311311
312- const importPid = parseInt ( stdout [ 0 ] . split ( ' ' ) [ 1 ] , 10 ) ;
312+ const importPid = parseInt ( stderr [ 0 ] . split ( ' ' ) [ 1 ] , 10 ) ;
313313 assert . notStrictEqual ( pid , importPid ) ;
314314 assert . deepStrictEqual ( stdout , [
315315 'running' ,
@@ -324,10 +324,13 @@ console.log(values.random);
324324 const file = createTmpFile ( ) ;
325325 const imported = "data:text/javascript,process._rawDebug('pid', process.pid);" ;
326326 const args = [ '--import' , imported , file ] ;
327- const { stdout, pid } = await runWriteSucceed ( { file, watchedFile : file , args } ) ;
327+ const { stdout, pid, stderr } = await runWriteSucceed ( { file, watchedFile : file , args } ) ;
328328
329- const importPid = parseInt ( stdout [ 0 ] . split ( ' ' ) [ 1 ] , 10 ) ;
329+ const importPid = parseInt ( stderr . split ( '\n' , 1 ) [ 0 ] . split ( ' ' , 2 ) [ 1 ] , 10 ) ;
330+
331+ assert . notStrictEqual ( importPid , NaN ) ;
330332 assert . notStrictEqual ( pid , importPid ) ;
333+
331334 assert . deepStrictEqual ( stdout , [
332335 'running' ,
333336 `Completed running ${ inspect ( file ) } ` ,
0 commit comments