mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Signed-off-by: Darshan Sen <darshan.sen@postman.com> PR-URL: https://github.com/nodejs/node/pull/40481 Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
349 B
JavaScript
12 lines
349 B
JavaScript
'use strict';
|
|
if (typeof require === 'undefined') {
|
|
console.log('1..0 # Skipped: Not being run as CommonJS');
|
|
process.exit(0);
|
|
}
|
|
|
|
const path = require('path');
|
|
const { Worker, SHARE_ENV } = require('worker_threads');
|
|
|
|
new Worker(path.resolve(process.cwd(), process.argv[2]), { env: SHARE_ENV })
|
|
.on('exit', (code) => process.exitCode = code);
|