mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 17:22:44 +00:00

PR-URL: https://github.com/nodejs/node/pull/32508 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
362 B
JavaScript
12 lines
362 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
const w = new Worker('abc)', { eval: true });
|
|
w.on('message', common.mustNotCall());
|
|
w.on('error', common.mustCall((err) => {
|
|
assert.strictEqual(err.constructor, SyntaxError);
|
|
assert.strictEqual(err.name, 'SyntaxError');
|
|
}));
|