xref: /third_party/node/test/pummel/test-heapdump-zlib.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/pummel/
11cb0ef41Sopenharmony_ci// Flags: --expose-internals
21cb0ef41Sopenharmony_ci'use strict';
31cb0ef41Sopenharmony_ciconst common = require('../common');
41cb0ef41Sopenharmony_ciconst { validateSnapshotNodes } = require('../common/heap');
51cb0ef41Sopenharmony_ciconst zlib = require('zlib');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_civalidateSnapshotNodes('Node / ZlibStream', []);
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ciconst gzip = zlib.createGzip();
101cb0ef41Sopenharmony_civalidateSnapshotNodes('Node / ZlibStream', [
111cb0ef41Sopenharmony_ci  {
121cb0ef41Sopenharmony_ci    children: [
131cb0ef41Sopenharmony_ci      { node_name: 'Zlib', edge_name: 'native_to_javascript' },
141cb0ef41Sopenharmony_ci      // No entry for memory because zlib memory is initialized lazily.
151cb0ef41Sopenharmony_ci    ],
161cb0ef41Sopenharmony_ci  },
171cb0ef41Sopenharmony_ci]);
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_cigzip.write('hello world', common.mustCall(() => {
201cb0ef41Sopenharmony_ci  validateSnapshotNodes('Node / ZlibStream', [
211cb0ef41Sopenharmony_ci    {
221cb0ef41Sopenharmony_ci      children: [
231cb0ef41Sopenharmony_ci        { node_name: 'Zlib', edge_name: 'native_to_javascript' },
241cb0ef41Sopenharmony_ci        { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' },
251cb0ef41Sopenharmony_ci      ],
261cb0ef41Sopenharmony_ci    },
271cb0ef41Sopenharmony_ci  ]);
281cb0ef41Sopenharmony_ci}));
29

Indexes created Thu Nov 07 10:32:03 CST 2024