Skip to content

Commit afd6e46

Browse files
puzpuzpuzaddaleax
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 8c0a781 commit afd6e46

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

‎test/pummel/test-heapdump-zlib.js‎

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

77
validateSnapshotNodes('Node / ZlibStream',[]);
8-
// eslint-disable-next-line no-unused-vars
9-
constgunzip=zlib.createGunzip();
8+
9+
constgzip=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)