Skip to content

Commit f3be3ec

Browse files
tniessenMylesBorins
authored andcommitted
test: check mustCall errors in test-fs-read-type
PR-URL: #36914 Refs: #36190 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 2459c11 commit f3be3ec

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/parallel/test-fs-read-type.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,18 @@ fs.read(fd,
107107
0,
108108
expected.length,
109109
0n,
110-
common.mustCall());
110+
common.mustSucceed());
111111

112112
fs.read(fd,
113113
Buffer.allocUnsafe(expected.length),
114114
0,
115115
expected.length,
116116
2n ** 53n - 1n,
117-
common.mustCall());
117+
common.mustCall((err) => {
118+
if (err) {
119+
assert.strictEqual(err.code, 'EFBIG');
120+
}
121+
}));
118122

119123
assert.throws(
120124
() => fs.readSync(fd, expected.length, 0, 'utf-8'),

0 commit comments

Comments
 (0)