Skip to content

Commit e21f035

Browse files
sinoontargos
authored andcommitted
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>
1 parent 1dd0205 commit e21f035

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ const exec = require('child_process').exec;
2626
constf=JSON.stringify(__filename);
2727
constnode=JSON.stringify(process.execPath);
2828
constcmd=`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)