8000 test: add mustCall() to child-process test · nodejs/node@7874360 · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 7874360

Browse files

Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424
const assert = require('assert');
2525
let bufsize = 0;
2626

@@ -43,10 +43,10 @@ function parent() {
4343
child.stdout.on('data', function(c) {
4444
n += c;
4545
});
46-
child.stdout.on('end', function() {
46+
child.stdout.on('end', common.mustCall(function() {
4747
assert.strictEqual(+n, sent);
4848
console.log('ok');
49-
});
49+
}));
5050

5151
// Write until the buffer fills up.
5252
let buf;