MCPcopy Index your code
hub / github.com/nodejs/node / getHeapSnapshotOptionTests

Function getHeapSnapshotOptionTests

test/common/heap.js:299–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297}
298
299function getHeapSnapshotOptionTests() {
300 const fixtures = require('../common/fixtures');
301 const cases = [
302 {
303 options: { exposeInternals: true },
304 expected: [{
305 children: [
306 // We don't have anything special to test here yet
307 // because we don't use cppgc or embedder heap tracer.
308 { edge_name: 'nonNumeric', node_name: 'test' },
309 ],
310 }],
311 },
312 {
313 options: { exposeNumericValues: true },
314 expected: [{
315 children: [
316 { edge_name: 'numeric', node_name: 'smi number' },
317 ],
318 }],
319 },
320 ];
321 return {
322 fixtures: fixtures.path('klass-with-fields.js'),
323 check(snapshot, expected) {
324 snapshot.validateSnapshot('Klass', expected, { loose: true });
325 },
326 cases,
327 };
328}
329
330/**
331 * Similar to {@link validateByRetainingPathFromNodes} but creates the snapshot from scratch.

Calls 2

requireFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…