mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 09:52:21 +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>
17 lines
513 B
JavaScript
17 lines
513 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const path = require('path');
|
|
const { Worker } = require('worker_threads');
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
const missing = path.join(tmpdir.path, '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(/Cannot find module .+does-not-exist.js/.test(err.message), err);
|
|
}));
|