summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-truncate.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-fs-truncate.js')
-rw-r--r--test/parallel/test-fs-truncate.js25
1 files changed, 3 insertions, 22 deletions
diff --git a/test/parallel/test-fs-truncate.js b/test/parallel/test-fs-truncate.js
index 7690ec7c24..b32d1ceb2b 100644
--- a/test/parallel/test-fs-truncate.js
+++ b/test/parallel/test-fs-truncate.js
@@ -187,7 +187,7 @@ function testFtruncate(cb) {
{
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
- message: 'The "len" argument must be of type number'
+ message: 'The "len" argument must be of type integer'
}
);
});
@@ -215,7 +215,7 @@ function testFtruncate(cb) {
{
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(
@@ -223,26 +223,7 @@ function testFtruncate(cb) {
{
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
- message: 'The "fd" argument must be of type number'
- }
- );
-});
-
-[-1, 0xFFFFFFFF + 1].forEach((i) => {
- common.expectsError(
- () => fs.ftruncate(i),
- {
- code: 'ERR_OUT_OF_RANGE',
- type: RangeError,
- message: 'The "fd" argument is out of range'
- }
- );
- common.expectsError(
- () => fs.ftruncateSync(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'
}
);
});