Files
bun.sh/test/js/node/disabled-module.test.js
dave caruso 9b6dc49575 Implement AsyncLocalStorage (#3089)
* 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
2023-07-19 17:20:00 -07:00

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');
});