mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Co-authored-by: 190n <7763597+190n@users.noreply.github.com> Co-authored-by: Ashcon Partovi <ashcon@partovi.net> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Co-authored-by: Don Isaac <donald.isaac@gmail.com> Co-authored-by: chloe caruso <git@paperclover.net>
14 lines
398 B
JavaScript
14 lines
398 B
JavaScript
import assert from "node:assert";
|
|
import { Worker } from "node:worker_threads";
|
|
|
|
// parent thread needs to have nonempty execArgv, otherwise the test is faulty
|
|
assert(process.execArgv.length > 0);
|
|
|
|
const execArgvToPass = JSON.parse(process.argv[2]);
|
|
new Worker("console.log(JSON.stringify(process.execArgv));", { eval: true, execArgv: execArgvToPass }).on(
|
|
"error",
|
|
e => {
|
|
throw e;
|
|
},
|
|
);
|