diff --git a/test/parallel/test-child-process-stdio-big-write-end.js b/test/parallel/test-child-process-stdio-big-write-end.js index 5e32314cc87a33..71333bdbd534ab 100644 --- a/test/parallel/test-child-process-stdio-big-write-end.js +++ b/test/parallel/test-child-process-stdio-big-write-end.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); let bufsize = 0; @@ -22,10 +22,10 @@ function parent() { child.stdout.on('data', function(c) { n += c; }); - child.stdout.on('end', function() { + child.stdout.on('end', common.mustCall(function() { assert.strictEqual(+n, sent); console.log('ok'); - }); + })); // Write until the buffer fills up. let buf;