Skip to content

Commit

Permalink
test: add mustCall() to child-process test
Browse files Browse the repository at this point in the history
Add common.mustCall() check to test-child-process-stdio-big-write-end.

PR-URL: #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>
  • Loading branch information
Trott authored and addaleax committed Jun 21, 2017
1 parent cbe7c5c commit 7874360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-child-process-stdio-big-write-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
let bufsize = 0;

Expand All @@ -43,10 +43,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;
Expand Down

0 comments on commit 7874360

Please sign in to comment.