From fe19f1460c8501500bda5f2cdb7367d53a055c06 Mon Sep 17 00:00:00 2001 From: hwaisiu Date: Fri, 6 Oct 2017 10:43:08 -0700 Subject: [PATCH] test: use default message for assert.strictEqual PR-URL: https://github.com/nodejs/node/pull/15970 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- .../test-zlib-from-concatenated-gzip.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js index 7f3942035a..9433fcffa8 100644 --- a/test/parallel/test-zlib-from-concatenated-gzip.js +++ b/test/parallel/test-zlib-from-concatenated-gzip.js @@ -7,26 +7,27 @@ const zlib = require('zlib'); const fs = require('fs'); const fixtures = require('../common/fixtures'); -const abcEncoded = zlib.gzipSync('abc'); -const defEncoded = zlib.gzipSync('def'); +const abc = 'abc'; +const def = 'def'; + +const abcEncoded = zlib.gzipSync(abc); +const defEncoded = zlib.gzipSync(def); const data = Buffer.concat([ abcEncoded, defEncoded ]); -assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef'); +assert.strictEqual(zlib.gunzipSync(data).toString(), (abc + def)); zlib.gunzip(data, common.mustCall((err, result) => { assert.ifError(err); - assert.strictEqual(result.toString(), 'abcdef', - 'result should match original string'); + assert.strictEqual(result.toString(), (abc + def)); })); zlib.unzip(data, common.mustCall((err, result) => { assert.ifError(err); - assert.strictEqual(result.toString(), 'abcdef', - 'result should match original string'); + assert.strictEqual(result.toString(), (abc + def)); })); // Multi-member support does not apply to zlib inflate/deflate. @@ -35,8 +36,7 @@ zlib.unzip(Buffer.concat([ zlib.deflateSync('def') ]), common.mustCall((err, result) => { assert.ifError(err); - assert.strictEqual(result.toString(), 'abc', - 'result should match contents of first "member"'); + assert.strictEqual(result.toString(), abc); })); // files that have the "right" magic bytes for starting a new gzip member