mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
278d37d90d
This test was broken by de2c68c7dd
.
Refs: https://github.com/nodejs/node/pull/31386
PR-URL: https://github.com/nodejs/node/pull/31494
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
25 lines
669 B
JavaScript
25 lines
669 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 / Worker', [
|
|
{
|
|
children: [
|
|
{ node_name: 'Node / MessagePort', edge_name: 'parent_port' },
|
|
{ node_name: 'Worker', edge_name: 'wrapped' }
|
|
]
|
|
}
|
|
]);
|
|
validateSnapshotNodes('Node / MessagePort', [
|
|
{
|
|
children: [
|
|
{ node_name: 'Node / MessagePortData', edge_name: 'data' }
|
|
]
|
|
}
|
|
], { loose: true });
|
|
worker.terminate();
|