node/test/pummel/test-heapdump-worker.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

17 lines
476 B
JavaScript

// Flags: --expose-internals
'use strict';
require('../common');
const { validateSnapshotNodes } = require('../common/heap');
const { Worker } = require('worker_threads');
validateSnapshotNodes('Node / Worker', []);
const worker = new Worker('setInterval(() => {}, 100);', { eval: true });
validateSnapshotNodes('Node / MessagePort', [
{
children: [
{ node_name: 'Node / MessagePortData', edge_name: 'data' },
],
},
], { loose: true });
worker.terminate();