File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ if (process.env.NODE_TEST_FORK_PORT) {
3535 req . write ( 'BAM' ) ;
3636 req . end ( ) ;
3737} else {
38- const server = http . createServer ( common . mustCallAtLeast ( ( req , res ) => {
38+ const server = http . createServer ( common . mustCall ( ( req , res ) => {
3939 res . writeHead ( 200 , { 'Content-Length' : '42' } ) ;
4040 req . pipe ( res ) ;
4141 assert . strictEqual ( req . destroyed , false ) ;
@@ -45,9 +45,13 @@ if (process.env.NODE_TEST_FORK_PORT) {
4545 res . end ( ) ;
4646 } ) ) ;
4747 } ) ) ;
48- server . listen ( 0 , function ( ) {
49- fork ( __filename , {
48+ server . listen ( 0 , common . mustCall ( function ( ) {
49+ const cp = fork ( __filename , {
50+ stdio : 'inherit' ,
5051 env : { ...process . env , NODE_TEST_FORK_PORT : this . address ( ) . port }
5152 } ) ;
52- } ) ;
53+ cp . once ( 'exit' , common . mustCall ( ( code ) => {
54+ assert . strictEqual ( code , 0 ) ;
55+ } ) )
56+ } ) ) ;
5357}
You can’t perform that action at this time.
0 commit comments