diff options
author | 2022-10-12 18:02:18 -0700 | |
---|---|---|
committer | 2022-10-12 18:02:18 -0700 | |
commit | a97914fff30ae2bff53c368982307cadb5000d27 (patch) | |
tree | cbae1ca4f2ff7489ff8f9e9aeebed074b0459b42 /test/bun.js/import-meta.test.js | |
parent | ec00838a03c809157b42cc8d006c95f9a5757163 (diff) | |
download | bun-a97914fff30ae2bff53c368982307cadb5000d27.tar.gz bun-a97914fff30ae2bff53c368982307cadb5000d27.tar.zst bun-a97914fff30ae2bff53c368982307cadb5000d27.zip |
Fix `require("bun")` and `import("bun")` when statically known
Diffstat (limited to 'test/bun.js/import-meta.test.js')
-rw-r--r-- | test/bun.js/import-meta.test.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bun.js/import-meta.test.js b/test/bun.js/import-meta.test.js index 2de528fe5..f099797e5 100644 --- a/test/bun.js/import-meta.test.js +++ b/test/bun.js/import-meta.test.js @@ -121,3 +121,11 @@ it("import.meta.dir", () => { it("import.meta.path", () => { expect(path.endsWith("/bun/test/bun.js/import-meta.test.js")).toBe(true); }); + +it('require("bun") works', () => { + expect(require("bun")).toBe(Bun); +}); + +it('import("bun") works', async () => { + expect(await import("bun")).toBe(Bun); +}); |