mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
966e3d3493
PR-URL: https://github.com/nodejs/node/pull/49128 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
16 lines
471 B
JavaScript
16 lines
471 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
const missing = tmpdir.resolve('does-not-exist.js');
|
|
|
|
const worker = new Worker(missing);
|
|
|
|
worker.on('error', common.mustCall((err) => {
|
|
// eslint-disable-next-line node-core/no-unescaped-regexp-dot
|
|
assert.match(err.message, /Cannot find module .+does-not-exist.js/);
|
|
}));
|