diff options
author | 2023-02-14 21:56:49 -0800 | |
---|---|---|
committer | 2023-02-14 21:56:49 -0800 | |
commit | 4dc6bf1b099a2a7425a5ff313cff9a9c828f6cd3 (patch) | |
tree | ca08eb558eaf421d70ea8cb9968e50d780b7cef0 /test/bun.js/disabled-module.test.js | |
parent | 7597e4ad2a813f53a8924d3820b339d487469bdd (diff) | |
download | bun-4dc6bf1b099a2a7425a5ff313cff9a9c828f6cd3.tar.gz bun-4dc6bf1b099a2a7425a5ff313cff9a9c828f6cd3.tar.zst bun-4dc6bf1b099a2a7425a5ff313cff9a9c828f6cd3.zip |
Add workaround for `tls` and `worker_threads`
Diffstat (limited to 'test/bun.js/disabled-module.test.js')
-rw-r--r-- | test/bun.js/disabled-module.test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bun.js/disabled-module.test.js b/test/bun.js/disabled-module.test.js new file mode 100644 index 000000000..5eb0db898 --- /dev/null +++ b/test/bun.js/disabled-module.test.js @@ -0,0 +1,9 @@ +import { describe, it, expect, beforeEach, afterEach, test } from "bun:test"; + +test("not implemented yet module masquerades as undefined and throws an error", () => { + const worker_threads = import.meta.require("worker_threads"); + + expect(typeof worker_threads).toBe("object"); + expect(typeof worker_threads.foo).toBe("undefined"); + expect(() => worker_threads.foo()).toThrow("Not implemented yet in Bun :("); +}); |