8000 test: add mustCall to test-fs-readfile-pipe · nodejs/node@7a35077 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 7a35077

Browse files
tonyhtytargos
authored andcommitted
test: add mustCall to test-fs-readfile-pipe
PR-URL: #27450 Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent af29ae0 commit 7a35077

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-fs-readfile-pipe.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ const assert = require('assert');
3131
const fs = require('fs');
3232

3333
if (process.argv[2] === 'child') {
34-
fs.readFile('/dev/stdin', function(er, data) {
34+
fs.readFile('/dev/stdin', common.mustCall(function(er, data) {
3535
assert.ifError(er);
3636
process.stdout.write(data);
37-
});
37+
}));
3838
return;
3939
}
4040

@@ -47,7 +47,7 @@ const exec = require('child_process').exec;
4747
const f = JSON.stringify(__filename);
4848
const node = JSON.stringify(process.execPath);
4949
const cmd = `cat ${filename} | ${node} ${f} child`;
50-
exec(cmd, function(err, stdout, stderr) {
50+
exec(cmd, common.mustCall(function(err, stdout, stderr) {
5151
assert.ifError(err);
5252
assert.strictEqual(
5353
stdout,
@@ -58,4 +58,4 @@ exec(cmd, function(err, stdout, stderr) {
5858
'',
5959
`expected not to read anything from stderr but got: '${stderr}'`);
6060
console.log('ok');
61-
});
61+
}));

0 commit comments

Comments
 (0)
0