diff options
Diffstat (limited to 'test/parallel/test-fs-close-errors.js')
-rw-r--r-- | test/parallel/test-fs-close-errors.js | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/test/parallel/test-fs-close-errors.js b/test/parallel/test-fs-close-errors.js index 040f6def44..cadcf2f78c 100644 --- a/test/parallel/test-fs-close-errors.js +++ b/test/parallel/test-fs-close-errors.js @@ -9,7 +9,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "fd" argument must be of type number' + message: 'The "fd" argument must be of type integer' } ); common.expectsError( @@ -17,26 +17,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "fd" argument must be of type number' - } - ); -}); - -[-1, 0xFFFFFFFF + 1].forEach((i) => { - common.expectsError( - () => fs.close(i), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "fd" argument is out of range' - } - ); - common.expectsError( - () => fs.closeSync(i), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "fd" argument is out of range' + message: 'The "fd" argument must be of type integer' } ); }); |