mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
test: fix test-heapdump-zlib
PR-URL: https://github.com/nodejs/node/pull/34499 Refs: https://github.com/nodejs/node/pull/34048 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
983364c0ff
commit
d1e4e8eaba
1 file changed
+16
-5
@@ -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' }
|
||||
]
|
||||
}
|
||||
]);
|
||||
}));
|
||||
Reference in new issue
Block a user