Skip to content

Commit a409b87

Browse files
keldoruscjihrig
authored andcommitted
test: improve message in test-fs-readfile-pipe-large
Improve assertion message by including expected and actual values. PR-URL: #16840 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 527ddda commit a409b87

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ const node = JSON.stringify(process.execPath);
2929
const cmd = `cat ${filename} | ${node} ${f} child`;
3030
exec(cmd, { maxBuffer: 1000000 }, function(err, stdout, stderr) {
3131
assert.ifError(err);
32-
assert.strictEqual(stdout, dataExpected, 'it reads the file and outputs it');
33-
assert.strictEqual(stderr, '', 'it does not write to stderr');
32+
assert.strictEqual(
33+
stdout,
34+
dataExpected,
35+
`expect it reads the file and outputs 999999 'a' but got : ${stdout}`
36+
);
37+
assert.strictEqual(
38+
stderr,
39+
'',
40+
`expect that it does not write to stderr, but got : ${stderr}`
41+
);
3442
console.log('ok');
3543
});
3644

0 commit comments

Comments
 (0)