• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Flags: --expose-internals
2'use strict';
3require('../common');
4const { validateSnapshotNodes } = require('../common/heap');
5const { Worker } = require('worker_threads');
6
7validateSnapshotNodes('Node / Worker', []);
8const worker = new Worker('setInterval(() => {}, 100);', { eval: true });
9validateSnapshotNodes('Node / MessagePort', [
10  {
11    children: [
12      { node_name: 'Node / MessagePortData', edge_name: 'data' },
13    ],
14  },
15], { loose: true });
16worker.terminate();
17