From e21f035666ecd97dac17ee37ee18bc049c0056c0 Mon Sep 17 00:00:00 2001 From: sinoon Date: Sun, 28 Apr 2019 16:56:13 +0800 Subject: [PATCH] test: add mustCall in test-fs-readfilesync-pipe-large.js PR-URL: https://github.com/nodejs/node/pull/27458 Reviewed-By: Weijia Wang Reviewed-By: Yorkie Liu Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Anto Aravinth Reviewed-By: Yongsheng Zhang --- test/parallel/test-fs-readfilesync-pipe-large.js | 16 ++++++++++------ 1 file 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 f8ad5a63318481..0f180f0f86005c 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);