diff --git a/test/parallel/test-child-process-fork-ref2.js b/test/parallel/test-child-process-fork-ref2.js index f114170630d6d2..f34d67ee17fcec 100644 --- a/test/parallel/test-child-process-fork-ref2.js +++ b/test/parallel/test-child-process-fork-ref2.js @@ -29,7 +29,7 @@ if (process.argv[2] === 'child') { setTimeout(function() { console.log('child -> will this keep it alive?'); - process.on('message', common.noop); + process.on('message', common.mustNotCall()); }, 400); } else { diff --git a/test/sequential/test-child-process-pass-fd.js b/test/sequential/test-child-process-pass-fd.js index 2d05407e67b99f..b2481270faf065 100644 --- a/test/sequential/test-child-process-pass-fd.js +++ b/test/sequential/test-child-process-pass-fd.js @@ -45,7 +45,7 @@ if (process.argv[2] !== 'child') { // the only thing keeping this worker alive will be IPC. This is important, // because it means a worker with no parent will have no referenced handles, // thus no work to do, and will exit immediately, preventing process leaks. - process.on('message', common.noop); + process.on('message', common.mustCall()); const server = net.createServer((c) => { process.once('message', function(msg) {