diff options
Diffstat (limited to 'test/parallel/test-fs-fchown.js')
-rw-r--r-- | test/parallel/test-fs-fchown.js | 65 |
1 files changed, 6 insertions, 59 deletions
diff --git a/test/parallel/test-fs-fchown.js b/test/parallel/test-fs-fchown.js index 2e75c6b909..8812fbbe3f 100644 --- a/test/parallel/test-fs-fchown.js +++ b/test/parallel/test-fs-fchown.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,7 +17,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' } ); @@ -26,7 +26,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "uid" argument must be of type number' + message: 'The "uid" argument must be of type integer' } ); common.expectsError( @@ -34,7 +34,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "uid" argument must be of type number' + message: 'The "uid" argument must be of type integer' } ); @@ -43,7 +43,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "gid" argument must be of type number' + message: 'The "gid" argument must be of type integer' } ); common.expectsError( @@ -51,60 +51,7 @@ const fs = require('fs'); { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "gid" argument must be of type number' + message: 'The "gid" argument must be of type integer' } ); }); - -[-1, 0xFFFFFFFF + 1].forEach((i) => { - common.expectsError( - () => fs.fchown(i), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "fd" argument is out of range' - } - ); - common.expectsError( - () => fs.fchownSync(i), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "fd" argument is out of range' - } - ); -}); - -common.expectsError( - () => fs.fchown(1, -1), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "uid" argument is out of range' - } -); -common.expectsError( - () => fs.fchownSync(1, -1), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "uid" argument is out of range' - } -); - -common.expectsError( - () => fs.fchown(1, 1, -1), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "gid" argument is out of range' - } -); -common.expectsError( - () => fs.fchownSync(1, 1, -1), - { - code: 'ERR_OUT_OF_RANGE', - type: RangeError, - message: 'The "gid" argument is out of range' - } -); |