From c7e3b4aaa6d0ffdcaca3cadd79fe9ef3d96d3ef6 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 15 Nov 2022 00:13:09 -0800 Subject: wip --- test/bun.js/esbuild-child_process.test.ts | 14 +++++++------- test/bun.js/import-meta.test.js | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'test/bun.js') diff --git a/test/bun.js/esbuild-child_process.test.ts b/test/bun.js/esbuild-child_process.test.ts index a7eb4f079..37713def2 100644 --- a/test/bun.js/esbuild-child_process.test.ts +++ b/test/bun.js/esbuild-child_process.test.ts @@ -2,13 +2,13 @@ import { transform, transformSync } from "esbuild"; import { describe, it, expect } from "bun:test"; describe("child_process.spawn - esbuild", () => { - it("should transform successfully", async () => { - const result = await transform("console.log('hello world')", { - loader: "js", - target: "node12", - }); - expect(result.code).toBe('console.log("hello world");\n'); - }); + // it("should transform successfully", async () => { + // const result = await transform("console.log('hello world')", { + // loader: "js", + // target: "node12", + // }); + // expect(result.code).toBe('console.log("hello world");\n'); + // }); it("works for input exceeding the pipe capacity", async () => { const hugeString = `console.log(${JSON.stringify("a".repeat(1000000))});`; diff --git a/test/bun.js/import-meta.test.js b/test/bun.js/import-meta.test.js index a6d663061..26adea139 100644 --- a/test/bun.js/import-meta.test.js +++ b/test/bun.js/import-meta.test.js @@ -22,6 +22,12 @@ it("import.meta.resolveSync", () => { ).toBe(import.meta.path); }); +it("require.cache", () => { + expect(require.cache).toBe(import.meta.require.cache); + expect(typeof require.cache).toBe("object"); + expect(require.cache !== null).toBe(true); +}); + it("import.meta.require (json)", () => { expect(import.meta.require("./require-json.json").hello).toBe(sync.hello); const require = Module.createRequire(import.meta.path); -- cgit v1.2.3