File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
// Flags: --expose-internals
2
2
'use strict' ;
3
- require ( '../common' ) ;
3
+ const common = require ( '../common' ) ;
4
4
const { validateSnapshotNodes } = require ( '../common/heap' ) ;
5
5
const zlib = require ( 'zlib' ) ;
6
6
7
7
validateSnapshotNodes ( 'Node / ZlibStream' , [ ] ) ;
8
- // eslint-disable-next-line no-unused-vars
9
- const gunzip = zlib . createGunzip ( ) ;
8
+
9
+ const gzip = zlib . createGzip ( ) ;
10
10
validateSnapshotNodes ( 'Node / ZlibStream' , [
11
11
{
12
12
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.
15
15
]
16
16
}
17
17
] ) ;
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
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments