diff options
author | Rich Trott <rtrott@gmail.com> | 2016-10-29 23:24:10 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-11-02 11:49:11 -0700 |
commit | 3eea668c7a5b5b89ed052c8bdeda4f5b6277f311 (patch) | |
tree | 8ac189ba49c645648cda1a7090a926345fa332b7 /lib/zlib.js | |
parent | 54d34314e389ec34cd6942ab9b7cbb0ba5eba167 (diff) | |
download | android-node-v8-3eea668c7a5b5b89ed052c8bdeda4f5b6277f311.tar.gz android-node-v8-3eea668c7a5b5b89ed052c8bdeda4f5b6277f311.tar.bz2 android-node-v8-3eea668c7a5b5b89ed052c8bdeda4f5b6277f311.zip |
test: increase test coverage for lib/zlib.js
Add tests for constructor behavior and parameter validation. Remove
condition check that cannot be triggered (nothing is greater than
`Infinity`).
PR-URL: https://github.com/nodejs/node/pull/9366
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/zlib.js')
-rw-r--r-- | lib/zlib.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/zlib.js b/lib/zlib.js index 42dd561623..bdce0c8d7f 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -300,8 +300,7 @@ function Zlib(opts, mode) { opts.finishFlush : constants.Z_FINISH; if (opts.chunkSize) { - if (opts.chunkSize < constants.Z_MIN_CHUNK || - opts.chunkSize > constants.Z_MAX_CHUNK) { + if (opts.chunkSize < constants.Z_MIN_CHUNK) { throw new Error('Invalid chunk size: ' + opts.chunkSize); } } |