test: add mustCall to test-fs-readfile-pipe-large

PR-URL: https://github.com/nodejs/node/pull/27460
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: Ouyang Yadong <oyydoibh@gmail.com>
This commit is contained in:
luoyu 2019-04-28 16:56:57 +08:00 committed by oyyd
parent 7cbbd51479
commit 54c973cee7

View File

@ -29,7 +29,7 @@ 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) {
exec(cmd, { maxBuffer: 1000000 }, common.mustCall((err, stdout, stderr) => {
assert.ifError(err);
assert.strictEqual(
stdout,
@ -42,7 +42,7 @@ exec(cmd, { maxBuffer: 1000000 }, function(err, stdout, stderr) {
`expect that it does not write to stderr, but got : ${stderr}`
);
console.log('ok');
});
}));
process.on('exit', function() {
fs.unlinkSync(filename);