test: add mustCall() to child-process test

Add common.mustCall() check to test-child-process-stdio-big-write-end.

PR-URL: https://github.com/nodejs/node/pull/13605
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott 2017-06-10 20:42:35 -07:00 committed by James M Snell
parent c88ba036b4
commit f308b4d9ed

View File

@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict'; 'use strict';
require('../common'); const common = require('../common');
const assert = require('assert'); const assert = require('assert');
let bufsize = 0; let bufsize = 0;
@ -43,10 +43,10 @@ function parent() {
child.stdout.on('data', function(c) { child.stdout.on('data', function(c) {
n += c; n += c;
}); });
child.stdout.on('end', function() { child.stdout.on('end', common.mustCall(function() {
assert.strictEqual(+n, sent); assert.strictEqual(+n, sent);
console.log('ok'); console.log('ok');
}); }));
// Write until the buffer fills up. // Write until the buffer fills up.
let buf; let buf;