Skip to content

Commit c2ec15a

Browse files
tniessenruyadorno
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 30b2aac commit c2ec15a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,18 @@ fs.read(fd,
109109
0,
110110
expected.length,
111111
0n,
112-
common.mustCall());
112+
common.mustSucceed());
113113

114114
fs.read(fd,
115115
Buffer.allocUnsafe(expected.length),
116116
0,
117117
expected.length,
118118
2n ** 53n - 1n,
119-
common.mustCall());
119+
common.mustCall((err) => {
120+
if (err) {
121+
assert.strictEqual(err.code, 'EFBIG');
122+
}
123+
}));
120124

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

0 commit comments

Comments
 (0)