Skip to content

Commit

Permalink
test: add mustCall in test-fs-readfilesync-pipe-large.js
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sinoon authored and targos committed Apr 30, 2019
1 parent 1dd0205 commit e21f035
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/parallel/test-fs-readfilesync-pipe-large.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ const exec = require('child_process').exec;
const f = JSON.stringify(__filename);
const node = JSON.stringify(process.execPath);
const cmd = `cat ${filename} | ${node} ${f} child`;
exec(cmd, { maxBuffer: 1000000 }, function(err, stdout, stderr) {
assert.ifError(err);
assert.strictEqual(stdout, dataExpected);
assert.strictEqual(stderr, '');
console.log('ok');
});
exec(
cmd,
{ maxBuffer: 1000000 },
common.mustCall(function(err, stdout, stderr) {
assert.ifError(err);
assert.strictEqual(stdout, dataExpected);
assert.strictEqual(stderr, '');
console.log('ok');
})
);

process.on('exit', function() {
fs.unlinkSync(filename);
Expand Down

0 comments on commit e21f035

Please sign in to comment.