diff options
Diffstat (limited to 'test/parallel/test-zlib-deflate-constructors.js')
-rw-r--r-- | test/parallel/test-zlib-deflate-constructors.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/parallel/test-zlib-deflate-constructors.js b/test/parallel/test-zlib-deflate-constructors.js index 01930b2720..e4b39002fb 100644 --- a/test/parallel/test-zlib-deflate-constructors.js +++ b/test/parallel/test-zlib-deflate-constructors.js @@ -14,7 +14,7 @@ assert.ok(new zlib.DeflateRaw() instanceof zlib.DeflateRaw); // Throws if `opts.chunkSize` is invalid assert.throws( - () => { new zlib.Deflate({chunkSize: -Infinity}); }, + () => { new zlib.Deflate({ chunkSize: -Infinity }); }, /^RangeError: Invalid chunk size: -Infinity$/ ); @@ -23,23 +23,23 @@ assert.strictEqual(zlib.constants.Z_MAX_CHUNK, Infinity); // Throws if `opts.windowBits` is invalid assert.throws( - () => { new zlib.Deflate({windowBits: -Infinity}); }, + () => { new zlib.Deflate({ windowBits: -Infinity }); }, /^RangeError: Invalid windowBits: -Infinity$/ ); assert.throws( - () => { new zlib.Deflate({windowBits: Infinity}); }, + () => { new zlib.Deflate({ windowBits: Infinity }); }, /^RangeError: Invalid windowBits: Infinity$/ ); // Throws if `opts.level` is invalid assert.throws( - () => { new zlib.Deflate({level: -Infinity}); }, + () => { new zlib.Deflate({ level: -Infinity }); }, /^RangeError: Invalid compression level: -Infinity$/ ); assert.throws( - () => { new zlib.Deflate({level: Infinity}); }, + () => { new zlib.Deflate({ level: Infinity }); }, /^RangeError: Invalid compression level: Infinity$/ ); @@ -56,34 +56,34 @@ assert.throws( // Throws if `opts.memLevel` is invalid assert.throws( - () => { new zlib.Deflate({memLevel: -Infinity}); }, + () => { new zlib.Deflate({ memLevel: -Infinity }); }, /^RangeError: Invalid memLevel: -Infinity$/ ); assert.throws( - () => { new zlib.Deflate({memLevel: Infinity}); }, + () => { new zlib.Deflate({ memLevel: Infinity }); }, /^RangeError: Invalid memLevel: Infinity$/ ); // Does not throw if opts.strategy is valid assert.doesNotThrow( - () => { new zlib.Deflate({strategy: zlib.constants.Z_FILTERED}); } + () => { new zlib.Deflate({ strategy: zlib.constants.Z_FILTERED }); } ); assert.doesNotThrow( - () => { new zlib.Deflate({strategy: zlib.constants.Z_HUFFMAN_ONLY}); } + () => { new zlib.Deflate({ strategy: zlib.constants.Z_HUFFMAN_ONLY }); } ); assert.doesNotThrow( - () => { new zlib.Deflate({strategy: zlib.constants.Z_RLE}); } + () => { new zlib.Deflate({ strategy: zlib.constants.Z_RLE }); } ); assert.doesNotThrow( - () => { new zlib.Deflate({strategy: zlib.constants.Z_FIXED}); } + () => { new zlib.Deflate({ strategy: zlib.constants.Z_FIXED }); } ); assert.doesNotThrow( - () => { new zlib.Deflate({ strategy: zlib.constants.Z_DEFAULT_STRATEGY}); } + () => { new zlib.Deflate({ strategy: zlib.constants.Z_DEFAULT_STRATEGY }); } ); // Throws if opt.strategy is the wrong type. @@ -94,7 +94,7 @@ assert.throws( // Throws if opts.strategy is invalid assert.throws( - () => { new zlib.Deflate({strategy: 'this is a bogus strategy'}); }, + () => { new zlib.Deflate({ strategy: 'this is a bogus strategy' }); }, /^TypeError: Invalid strategy: this is a bogus strategy$/ ); @@ -106,6 +106,6 @@ assert.throws( // Throws if opts.dictionary is not a Buffer assert.throws( - () => { new zlib.Deflate({dictionary: 'not a buffer'}); }, + () => { new zlib.Deflate({ dictionary: 'not a buffer' }); }, /^TypeError: Invalid dictionary: it should be a Buffer, TypedArray, or DataView$/ ); |