Skip to content

Commit a905f3b

Browse files
committed
[Squash] Fix nits
1 parent df0be87 commit a905f3b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/parallel/test-zlib-from-gzip-with-trailing-garbage.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ assert.throws(
3737
/^Error: unknown compression method$/
3838
);
3939

40-
zlib.gunzip(data, common.expectsError({
41-
code: 'Z_DATA_ERROR',
42-
type: Error,
43-
message: 'unknown compression method'
40+
zlib.gunzip(data, common.mustCall((err, result) => {
41+
common.expectsError({
42+
code: 'Z_DATA_ERROR',
43+
type: Error,
44+
message: 'unknown compression method'
45+
})(err);
46+
assert.strictEqual(result, undefined);
4447
}));
4548

4649
// In this case the trailing junk is too short to be a gzip segment

test/parallel/test-zlib-random-byte-pipes.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ const gunz = zlib.createGunzip();
150150

151151
inp.pipe(gzip).pipe(gunz).pipe(out);
152152

153-
inp.on('data', common.mustCall(4));
154-
gzip.on('data', common.mustCall(2));
155-
gunz.on('data', common.mustCall());
156153
out.on('data', common.mustCall((c) => {
157154
assert.strictEqual(c, inp._hash, 'hashes should match');
158155
}));

0 commit comments

Comments
 (0)