@@ -15,7 +15,7 @@ assert.ok(new zlib.DeflateRaw() instanceof zlib.DeflateRaw);
15
15
// Throws if `opts.chunkSize` is invalid
16
16
assert . throws (
17
17
( ) => { new zlib . Deflate ( { chunkSize : - Infinity } ) ; } ,
18
- / ^ E r r o r : I n v a l i d c h u n k s i z e : - I n f i n i t y $ /
18
+ / ^ R a n g e E r r o r : I n v a l i d c h u n k s i z e : - I n f i n i t y $ /
19
19
) ;
20
20
21
21
// Confirm that maximum chunk size cannot be exceeded because it is `Infinity`.
@@ -24,23 +24,23 @@ assert.strictEqual(zlib.constants.Z_MAX_CHUNK, Infinity);
24
24
// Throws if `opts.windowBits` is invalid
25
25
assert . throws (
26
26
( ) => { new zlib . Deflate ( { windowBits : - Infinity } ) ; } ,
27
- / ^ E r r o r : I n v a l i d w i n d o w B i t s : - I n f i n i t y $ /
27
+ / ^ R a n g e E r r o r : I n v a l i d w i n d o w B i t s : - I n f i n i t y $ /
28
28
) ;
29
29
30
30
assert . throws (
31
31
( ) => { new zlib . Deflate ( { windowBits : Infinity } ) ; } ,
32
- / ^ E r r o r : I n v a l i d w i n d o w B i t s : I n f i n i t y $ /
32
+ / ^ R a n g e E r r o r : I n v a l i d w i n d o w B i t s : I n f i n i t y $ /
33
33
) ;
34
34
35
35
// Throws if `opts.level` is invalid
36
36
assert . throws (
37
37
( ) => { new zlib . Deflate ( { level : - Infinity } ) ; } ,
38
- / ^ E r r o r : I n v a l i d c o m p r e s s i o n l e v e l : - I n f i n i t y $ /
38
+ / ^ R a n g e E r r o r : I n v a l i d c o m p r e s s i o n l e v e l : - I n f i n i t y $ /
39
39
) ;
40
40
41
41
assert . throws (
42
42
( ) => { new zlib . Deflate ( { level : Infinity } ) ; } ,
43
- / ^ E r r o r : I n v a l i d c o m p r e s s i o n l e v e l : I n f i n i t y $ /
43
+ / ^ R a n g e E r r o r : I n v a l i d c o m p r e s s i o n l e v e l : I n f i n i t y $ /
44
44
) ;
45
45
46
46
// Throws a RangeError if `level` invalid in `Deflate.prototype.params()`
@@ -57,12 +57,12 @@ assert.throws(
57
57
// Throws if `opts.memLevel` is invalid
58
58
assert . throws (
59
59
( ) => { new zlib . Deflate ( { memLevel : - Infinity } ) ; } ,
60
- / ^ E r r o r : I n v a l i d m e m L e v e l : - I n f i n i t y $ /
60
+ / ^ R a n g e E r r o r : I n v a l i d m e m L e v e l : - I n f i n i t y $ /
61
61
) ;
62
62
63
63
assert . throws (
64
64
( ) => { new zlib . Deflate ( { memLevel : Infinity } ) ; } ,
65
- / ^ E r r o r : I n v a l i d m e m L e v e l : I n f i n i t y $ /
65
+ / ^ R a n g e E r r o r : I n v a l i d m e m L e v e l : I n f i n i t y $ /
66
66
) ;
67
67
68
68
// Does not throw if opts.strategy is valid
@@ -89,13 +89,13 @@ assert.doesNotThrow(
89
89
// Throws if opt.strategy is the wrong type.
90
90
assert . throws (
91
91
( ) => { new zlib . Deflate ( { strategy : '' + zlib . constants . Z_RLE } ) ; } ,
92
- / ^ E r r o r : I n v a l i d s t r a t e g y : 3 $ /
92
+ / ^ T y p e E r r o r : I n v a l i d s t r a t e g y : 3 $ /
93
93
) ;
94
94
95
95
// Throws if opts.strategy is invalid
96
96
assert . throws (
97
97
( ) => { new zlib . Deflate ( { strategy : 'this is a bogus strategy' } ) ; } ,
98
- / ^ E r r o r : I n v a l i d s t r a t e g y : t h i s i s a b o g u s s t r a t e g y $ /
98
+ / ^ T y p e E r r o r : I n v a l i d s t r a t e g y : t h i s i s a b o g u s s t r a t e g y $ /
99
99
) ;
100
100
101
101
// Throws TypeError if `strategy` is invalid in `Deflate.prototype.params()`
@@ -107,5 +107,5 @@ assert.throws(
107
107
// Throws if opts.dictionary is not a Buffer
108
108
assert . throws (
109
109
( ) => { new zlib . Deflate ( { dictionary : 'not a buffer' } ) ; } ,
110
- / ^ E r r o r : I n v a l i d d i c t i o n a r y : i t s h o u l d b e a B u f f e r i n s t a n c e $ /
110
+ / ^ T y p e E r r o r : I n v a l i d d i c t i o n a r y : i t s h o u l d b e a B u f f e r i n s t a n c e $ /
111
111
) ;
0 commit comments