diff --git a/test/parallel/test-fs-read.js b/test/parallel/test-fs-read.js index 864876537c22c6..715c7b6aebd98d 100644 --- a/test/parallel/test-fs-read.js +++ b/test/parallel/test-fs-read.js @@ -68,3 +68,11 @@ test(new Uint8Array(expected.length), assert.strictEqual(nRead, 0); })); } + +assert.throws( + () => fs.read(null, Buffer.alloc(1), 0, 1, 0), + { + message: 'The "fd" argument must be of type number. Received type object', + code: 'ERR_INVALID_ARG_TYPE', + } +);