@@ -307,9 +307,9 @@ console.log(values.random);
307
307
const file = createTmpFile ( ) ;
308
308
const required = createTmpFile ( 'process._rawDebug(\'pid\', process.pid);' ) ;
309
309
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 } ) ;
311
311
312
- const importPid = parseInt ( stdout [ 0 ] . split ( ' ' ) [ 1 ] , 10 ) ;
312
+ const importPid = parseInt ( stderr [ 0 ] . split ( ' ' ) [ 1 ] , 10 ) ;
313
313
assert . notStrictEqual ( pid , importPid ) ;
314
314
assert . deepStrictEqual ( stdout , [
315
315
'running' ,
@@ -324,10 +324,13 @@ console.log(values.random);
324
324
const file = createTmpFile ( ) ;
325
325
const imported = "data:text/javascript,process._rawDebug('pid', process.pid);" ;
326
326
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 } ) ;
328
328
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 ) ;
330
332
assert . notStrictEqual ( pid , importPid ) ;
333
+
331
334
assert . deepStrictEqual ( stdout , [
332
335
'running' ,
333
336
`Completed running ${ inspect ( file ) } ` ,
0 commit comments