mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
ed60e863e7
This test was broken by d35af56e5f
.
Refs: https://github.com/nodejs/node/pull/21283
Fixes: https://github.com/nodejs/node/issues/26712
PR-URL: https://github.com/nodejs/node/pull/26713
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
26 lines
747 B
JavaScript
26 lines
747 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 / AsyncRequest', edge_name: 'on_thread_finished_' },
|
|
{ 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();
|