Skip to content

Commit 3f11ba1

Browse files
puzpuzpuzMylesBorins
authored andcommitted
test: fix test-heapdump-zlib
PR-URL: #34499 Refs: #34048 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 99a6487 commit 3f11ba1

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

test/pummel/test-heapdump-zlib.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
// Flags: --expose-internals
22
'use strict';
3-
require('../common');
3+
const common = require('../common');
44
const { validateSnapshotNodes } = require('../common/heap');
55
const zlib = require('zlib');
66

77
validateSnapshotNodes('Node / ZlibStream', []);
8-
// eslint-disable-next-line no-unused-vars
9-
const gunzip = zlib.createGunzip();
8+
9+
const gzip = zlib.createGzip();
1010
validateSnapshotNodes('Node / ZlibStream', [
1111
{
1212
children: [
13-
{ node_name: 'Zlib', edge_name: 'wrapped' },
14-
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' }
13+
{ node_name: 'Zlib', edge_name: 'wrapped' }
14+
// No entry for memory because zlib memory is initialized lazily.
1515
]
1616
}
1717
]);
18+
19+
gzip.write('hello world', common.mustCall(() => {
20+
validateSnapshotNodes('Node / ZlibStream', [
21+
{
22+
children: [
23+
{ node_name: 'Zlib', edge_name: 'wrapped' },
24+
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' }
25+
]
26+
}
27+
]);
28+
}));

0 commit comments

Comments
 (0)