@@ -44,7 +44,7 @@ assert.throws(() => {
44
44
} , {
45
45
code : 'ERR_OUT_OF_RANGE' ,
46
46
name : 'RangeError' ,
47
- message : 'The value of "offset" is out of range. It must be >= 0 && <= 4 . ' +
47
+ message : 'The value of "offset" is out of range. It must be >= 0. ' +
48
48
'Received -1'
49
49
} ) ;
50
50
@@ -59,7 +59,7 @@ assert.throws(() => {
59
59
code : 'ERR_OUT_OF_RANGE' ,
60
60
name : 'RangeError' ,
61
61
message : 'The value of "length" is out of range. ' +
62
- 'It must be >= 0 && <= 4 . Received -1'
62
+ 'It must be >= 0. Received -1'
63
63
} ) ;
64
64
65
65
@@ -96,7 +96,7 @@ assert.throws(() => {
96
96
code : 'ERR_OUT_OF_RANGE' ,
97
97
name : 'RangeError' ,
98
98
message : 'The value of "offset" is out of range. ' +
99
- 'It must be >= 0 && <= 4 . Received -1'
99
+ 'It must be >= 0. Received -1'
100
100
} ) ;
101
101
102
102
assert . throws ( ( ) => {
@@ -109,5 +109,18 @@ assert.throws(() => {
109
109
code : 'ERR_OUT_OF_RANGE' ,
110
110
name : 'RangeError' ,
111
111
message : 'The value of "length" is out of range. ' +
112
- 'It must be >= 0 && <= 4. Received -1'
112
+ 'It must be >= 0. Received -1'
113
+ } ) ;
114
+
115
+ assert . throws ( ( ) => {
116
+ fs . readSync ( fd ,
117
+ Buffer . allocUnsafe ( expected . length ) ,
118
+ 0 ,
119
+ expected . length + 1 ,
120
+ 0 ) ;
121
+ } , {
122
+ code : 'ERR_OUT_OF_RANGE' ,
123
+ name : 'RangeError' ,
124
+ message : 'The value of "length" is out of range. ' +
125
+ 'It must be <= 4. Received 5'
113
126
} ) ;
0 commit comments