diff options
author | sinoon <sinoon1218@gmail.com> | 2019-04-28 16:56:13 +0800 |
---|---|---|
committer | oyyd <oyydoibh@gmail.com> | 2019-04-30 10:16:51 +0800 |
commit | 034a568502145a056ebe43f59b7d0e72eb04e3aa (patch) | |
tree | 539c97f197fd5a812cbdb95336fe73368b71b32d | |
parent | 92ab466b74c37a22ea8e378b144391789d2c920c (diff) | |
download | android-node-v8-034a568502145a056ebe43f59b7d0e72eb04e3aa.tar.gz android-node-v8-034a568502145a056ebe43f59b7d0e72eb04e3aa.tar.bz2 android-node-v8-034a568502145a056ebe43f59b7d0e72eb04e3aa.zip |
test: add mustCall in test-fs-readfilesync-pipe-large.js
PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r-- | test/parallel/test-fs-readfilesync-pipe-large.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js index f8ad5a6331..0f180f0f86 100644 --- a/test/parallel/test-fs-readfilesync-pipe-large.js +++ b/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); |