diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-03-19 14:17:50 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-03-25 01:45:40 +0100 |
commit | acc3c770e7717673ee87fa37076fc50fcb91e4ea (patch) | |
tree | 278e9535d850eb1ae97d0dfd2bfefca3408d3a77 /test/parallel/test-fs-stat.js | |
parent | 058e7fb8e66cafae700c5cb437d08572150fa69f (diff) | |
download | android-node-v8-acc3c770e7717673ee87fa37076fc50fcb91e4ea.tar.gz android-node-v8-acc3c770e7717673ee87fa37076fc50fcb91e4ea.tar.bz2 android-node-v8-acc3c770e7717673ee87fa37076fc50fcb91e4ea.zip |
fs: fix error handling
Right now there are multiple cases where the validated entry would
not be returned or a wrong error is thrown. This fixes both cases.
PR-URL: https://github.com/nodejs/node/pull/19445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-fs-stat.js')
-rw-r--r-- | test/parallel/test-fs-stat.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index bbb3281187..1003890bb8 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -138,7 +138,8 @@ fs.stat(__filename, common.mustCall(function(err, s) { { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError [ERR_INVALID_ARG_TYPE]', - message: 'The "fd" argument must be of type integer' + message: 'The "fd" argument must be of type number. ' + + `Received type ${typeof input}` } ); }); |