diff --git a/test/parallel/test-child-process-pipe-dataflow.js b/test/parallel/test-child-process-pipe-dataflow.js index 31846c8a715c4c..2e2edc65e9e0d5 100644 --- a/test/parallel/test-child-process-pipe-dataflow.js +++ b/test/parallel/test-child-process-pipe-dataflow.js @@ -66,8 +66,8 @@ const MB = KB * KB; wcBuf += data; })); - wc.on('close', common.mustCall(() => { + process.on('exit', () => { // Grep always adds one extra byte at the end. assert.strictEqual(wcBuf.trim(), (MB + 1).toString()); - })); + }); }