diff options
author | 2023-08-07 23:58:38 -0700 | |
---|---|---|
committer | 2023-08-07 23:58:38 -0700 | |
commit | 5497accbdb14da9e361175ad1cd074731b7f8eeb (patch) | |
tree | 994424356f9059b1171f410a9689f2d00bf89f6b /test/js/web/worker-fixture-env.js | |
parent | 182e600eb79655e85b3f0371bc46fc4de8e70094 (diff) | |
download | bun-5497accbdb14da9e361175ad1cd074731b7f8eeb.tar.gz bun-5497accbdb14da9e361175ad1cd074731b7f8eeb.tar.zst bun-5497accbdb14da9e361175ad1cd074731b7f8eeb.zip |
Add `env` option for `node:worker_threads` (#4052)
* almost works
* env stuff
* test fixes
* wtfmove
* ok
* ok
* ref by default
* it now does the ref stuff by default
* cool
Diffstat (limited to 'test/js/web/worker-fixture-env.js')
-rw-r--r-- | test/js/web/worker-fixture-env.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/js/web/worker-fixture-env.js b/test/js/web/worker-fixture-env.js new file mode 100644 index 000000000..203ed3141 --- /dev/null +++ b/test/js/web/worker-fixture-env.js @@ -0,0 +1,12 @@ +import * as worker_threads from "worker_threads"; + +if (worker_threads.isMainThread) throw new Error("worker_threads.isMainThread is wrong"); + +Bun.inspect(process.env); + +onmessage = ({}) => { + postMessage({ + env: process.env, + hello: process.env.hello, + }); +}; |