Skip to content

Commit e4c9b45

Browse files
tniessenBethGriggs
authored andcommitted
test: check mustCall errors in test-fs-read-type
PR-URL: #36914 Refs: #36190 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent a45c38f commit e4c9b45

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)