Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: https://github.com/nodejs/node/pull/37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
28 lines
728 B
JavaScript
28 lines
728 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: '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' },
|
|
]
|
|
},
|
|
]);
|
|
}));
|