@@ -307,9 +307,9 @@ console.log(values.random);
307307const file = createTmpFile ( ) ;
308308const required = createTmpFile ( 'process._rawDebug(\'pid\', process.pid);' ) ;
309309const 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 ) ;
313313assert . notStrictEqual ( pid , importPid ) ;
314314assert . deepStrictEqual ( stdout , [
315315'running' ,
@@ -324,10 +324,13 @@ console.log(values.random);
324324const file = createTmpFile ( ) ;
325325const imported = "data:text/javascript,process._rawDebug('pid', process.pid);" ;
326326const 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 ) ;
330332assert . notStrictEqual ( pid , importPid ) ;
333+
331334assert . deepStrictEqual ( stdout , [
332335'running' ,
333336`Completed running ${ inspect ( file ) } ` ,
0 commit comments