diff options
author | James M Snell <jasnell@gmail.com> | 2017-07-24 11:21:48 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-08-03 17:07:14 -0700 |
commit | 4e8bc7181c1f2491e187477798d433a4488f43d4 (patch) | |
tree | e6e329c81072a449fe32ae2e8f14a53bc12ac3c3 /test/parallel/test-zlib-from-gzip-with-trailing-garbage.js | |
parent | 4b23b429818d3fef1714cbdea4c6a1fd06410a5f (diff) | |
download | android-node-v8-4e8bc7181c1f2491e187477798d433a4488f43d4.tar.gz android-node-v8-4e8bc7181c1f2491e187477798d433a4488f43d4.tar.bz2 android-node-v8-4e8bc7181c1f2491e187477798d433a4488f43d4.zip |
test: improve multiple zlib tests
PR-URL: https://github.com/nodejs/node/pull/14455
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-zlib-from-gzip-with-trailing-garbage.js')
-rw-r--r-- | test/parallel/test-zlib-from-gzip-with-trailing-garbage.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js index 0cc4953d41..e5588e75f2 100644 --- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js +++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js @@ -38,9 +38,11 @@ assert.throws( ); zlib.gunzip(data, common.mustCall((err, result) => { - assert(err instanceof Error); - assert.strictEqual(err.code, 'Z_DATA_ERROR'); - assert.strictEqual(err.message, 'unknown compression method'); + common.expectsError({ + code: 'Z_DATA_ERROR', + type: Error, + message: 'unknown compression method' + })(err); assert.strictEqual(result, undefined); })); |