aboutsummaryrefslogtreecommitdiff
path: root/test/js/web/worker-fixture-env.js
blob: 203ed31419df23cc1815c455ff9e9a53c0a51aa0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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,
  });
};