-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #34499 Refs: #34048 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information
1 parent
99a6487
commit 3f11ba1
Showing
1 changed file
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
// Flags: --expose-internals | ||
'use strict'; | ||
require('../common'); | ||
const common = require('../common'); | ||
const { validateSnapshotNodes } = require('../common/heap'); | ||
const zlib = require('zlib'); | ||
|
||
validateSnapshotNodes('Node / ZlibStream', []); | ||
// eslint-disable-next-line no-unused-vars | ||
const gunzip = zlib.createGunzip(); | ||
|
||
const gzip = zlib.createGzip(); | ||
validateSnapshotNodes('Node / ZlibStream', [ | ||
{ | ||
children: [ | ||
{ node_name: 'Zlib', edge_name: 'wrapped' }, | ||
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' } | ||
{ node_name: 'Zlib', edge_name: 'wrapped' } | ||
// No entry for memory because zlib memory is initialized lazily. | ||
] | ||
} | ||
]); | ||
|
||
gzip.write('hello world', common.mustCall(() => { | ||
validateSnapshotNodes('Node / ZlibStream', [ | ||
{ | ||
children: [ | ||
{ node_name: 'Zlib', edge_name: 'wrapped' }, | ||
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' } | ||
] | ||
} | ||
]); | ||
})); |