0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-22 07:37:56 +01:00
nodejs/test/pummel/test-heapdump-zlib.js
Antoine du Hamel 873e5ce54a
test: add trailing commas in test/pummel
PR-URL: https://github.com/nodejs/node/pull/46610
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2023-02-12 17:36:39 +01:00

29 lines
756 B
JavaScript

// Flags: --expose-internals
'use strict';
const common = require('../common');
const { validateSnapshotNodes } = require('../common/heap');
const zlib = require('zlib');
validateSnapshotNodes('Node / ZlibStream', []);
const gzip = zlib.createGzip();
validateSnapshotNodes('Node / ZlibStream', [
{
children: [
{ node_name: 'Zlib', edge_name: 'native_to_javascript' },
// 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: 'native_to_javascript' },
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' },
],
},
]);
}));