From f3be3ec4179b06ae700e1268c15982427976c869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Wed, 13 Jan 2021 16:12:04 +0100 Subject: [PATCH] test: check mustCall errors in test-fs-read-type PR-URL: https://github.com/nodejs/node/pull/36914 Refs: https://github.com/nodejs/node/pull/36190 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Antoine du Hamel Reviewed-By: Rich Trott --- test/parallel/test-fs-read-type.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-read-type.js b/test/parallel/test-fs-read-type.js index f28c3d34c699d1..79d6c32be1ffa6 100644 --- a/test/parallel/test-fs-read-type.js +++ b/test/parallel/test-fs-read-type.js @@ -107,14 +107,18 @@ fs.read(fd, 0, expected.length, 0n, - common.mustCall()); + common.mustSucceed()); fs.read(fd, Buffer.allocUnsafe(expected.length), 0, expected.length, 2n ** 53n - 1n, - common.mustCall()); + common.mustCall((err) => { + if (err) { + assert.strictEqual(err.code, 'EFBIG'); + } + })); assert.throws( () => fs.readSync(fd, expected.length, 0, 'utf-8'),