Skip to content

Commit

Permalink
test: use default message for assert.strictEqual
Browse files Browse the repository at this point in the history
PR-URL: #15970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
hwaisiu authored and MylesBorins committed Nov 28, 2017
1 parent 47bf494 commit 339bdca
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/parallel/test-zlib-from-concatenated-gzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 339bdca

Please sign in to comment.