mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
* work to get async local storage working. * a * a * everything but queueMicrotask * sdfghj * . * finish * tests * test * ok * done * im so stupid * Upgrade WebKit * refactor * refactor * changes requested * oops * cool * fix runInAsyncScope
17 lines
771 B
JavaScript
17 lines
771 B
JavaScript
import { expect, test } from "bun:test";
|
|
import * as worker_threads from "worker_threads";
|
|
import worker_threads_default from "worker_threads";
|
|
|
|
test("not implemented yet module masquerades as undefined and throws an error", () => {
|
|
expect(typeof worker_threads.default).toBe("undefined");
|
|
expect(typeof worker_threads_default).toBe("undefined");
|
|
expect(typeof worker_threads.getEnvironmentData).toBe("undefined");
|
|
expect(typeof worker_threads_default.getEnvironmentData).toBe("undefined");
|
|
});
|
|
|
|
test("esbuild functions with worker_threads stub", async () => {
|
|
const esbuild = await import("esbuild");
|
|
const result = await esbuild.transform('console . log( "hello world" )', { minify: true });
|
|
expect(result.code).toBe('console.log("hello world");\n');
|
|
});
|