diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index 6bb82b523f8985..71019b6e01c03a 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -81,7 +81,7 @@ var stdinStdout = ''; stdinProc.stdout.on('data', function(d) { stdinStdout += d; }); -stdinProc.on('exit', function(code) { +stdinProc.on('close', function(code) { assert.equal(code, 0); assert.equal(stdinStdout, 'A\nhello\n'); }); @@ -97,7 +97,7 @@ var replStdout = ''; replProc.stdout.on('data', function(d) { replStdout += d; }); -replProc.on('exit', function(code) { +replProc.on('close', function(code) { assert.equal(code, 0); const output = [ 'A',