Skip to content

Commit e21f035

Browse files
sinoontargos
authored andcommittedApr 30, 2019
test: add mustCall in test-fs-readfilesync-pipe-large.js
PR-URL: #27458 Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Yorkie Liu <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
1 parent 1dd0205 commit e21f035

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed
 

‎test/parallel/test-fs-readfilesync-pipe-large.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ const exec = require('child_process').exec;
2626
const f = JSON.stringify(__filename);
2727
const node = JSON.stringify(process.execPath);
2828
const cmd = `cat ${filename} | ${node} ${f} child`;
29-
exec(cmd, { maxBuffer: 1000000 }, function(err, stdout, stderr) {
30-
assert.ifError(err);
31-
assert.strictEqual(stdout, dataExpected);
32-
assert.strictEqual(stderr, '');
33-
console.log('ok');
34-
});
29+
exec(
30+
cmd,
31+
{ maxBuffer: 1000000 },
32+
common.mustCall(function(err, stdout, stderr) {
33+
assert.ifError(err);
34+
assert.strictEqual(stdout, dataExpected);
35+
assert.strictEqual(stderr, '');
36+
console.log('ok');
37+
})
38+
);
3539

3640
process.on('exit', function() {
3741
fs.unlinkSync(filename);

0 commit comments

Comments
 (0)
Please sign in to comment.