Skip to content
Permalink
Browse files

test: add mustCall in test-fs-readfilesync-pipe-large.js

PR-URL: #27458
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information...
sinoon authored and oyyd committed Apr 28, 2019
1 parent 92ab466 commit 034a568502145a056ebe43f59b7d0e72eb04e3aa
Showing with 10 additions and 6 deletions.
  1. +10 −6 test/parallel/test-fs-readfilesync-pipe-large.js
@@ -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);

0 comments on commit 034a568

Please sign in to comment.
You can’t perform that action at this time.