Skip to content

Commit 339bdca

Browse files
hwaisiuMylesBorins
hwaisiu
authored andcommitted
test: use default message for assert.strictEqual
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 47bf494 commit 339bdca

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/parallel/test-zlib-from-concatenated-gzip.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@ const zlib = require('zlib');
77
const fs = require('fs');
88
const fixtures = require('../common/fixtures');
99

10-
const abcEncoded = zlib.gzipSync('abc');
11-
const defEncoded = zlib.gzipSync('def');
10+
const abc = 'abc';
11+
const def = 'def';
12+
13+
const abcEncoded = zlib.gzipSync(abc);
14+
const defEncoded = zlib.gzipSync(def);
1215

1316
const data = Buffer.concat([
1417
abcEncoded,
1518
defEncoded
1619
]);
1720

18-
assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef');
21+
assert.strictEqual(zlib.gunzipSync(data).toString(), (abc + def));
1922

2023
zlib.gunzip(data, common.mustCall((err, result) => {
2124
assert.ifError(err);
22-
assert.strictEqual(result.toString(), 'abcdef',
23-
'result should match original string');
25+
assert.strictEqual(result.toString(), (abc + def));
2426
}));
2527

2628
zlib.unzip(data, common.mustCall((err, result) => {
2729
assert.ifError(err);
28-
assert.strictEqual(result.toString(), 'abcdef',
29-
'result should match original string');
30+
assert.strictEqual(result.toString(), (abc + def));
3031
}));
3132

3233
// Multi-member support does not apply to zlib inflate/deflate.
@@ -35,8 +36,7 @@ zlib.unzip(Buffer.concat([
3536
zlib.deflateSync('def')
3637
]), common.mustCall((err, result) => {
3738
assert.ifError(err);
38-
assert.strictEqual(result.toString(), 'abc',
39-
'result should match contents of first "member"');
39+
assert.strictEqual(result.toString(), abc);
4040
}));
4141

4242
// files that have the "right" magic bytes for starting a new gzip member

0 commit comments

Comments
 (0)