mirror of
https://github.com/nodejs/node.git
synced 2025-05-11 16:21:27 +00:00

PR-URL: https://github.com/nodejs/node/pull/29866 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
11 lines
338 B
JavaScript
11 lines
338 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
const w = new Worker(fixtures.path('worker-script.mjs'));
|
|
w.on('message', common.mustCall((message) => {
|
|
assert.strictEqual(message, 'Hello, world!');
|
|
}));
|