mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
0633e9a0b5
PR-URL: https://github.com/nodejs/node/pull/44045 Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
344 B
JavaScript
12 lines
344 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
const dc = require('diagnostics_channel');
|
|
|
|
dc.subscribe('worker_threads', common.mustCall(({ worker }) => {
|
|
assert.strictEqual(worker instanceof Worker, true);
|
|
}));
|
|
|
|
new Worker('const a = 1;', { eval: true });
|