aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets
diff options
context:
space:
mode:
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r--integration/bunjs-only-snippets/response.file.test.js2
-rw-r--r--integration/bunjs-only-snippets/transpiler.test.js8
2 files changed, 2 insertions, 8 deletions
diff --git a/integration/bunjs-only-snippets/response.file.test.js b/integration/bunjs-only-snippets/response.file.test.js
index f05c875f0..2d0b6506e 100644
--- a/integration/bunjs-only-snippets/response.file.test.js
+++ b/integration/bunjs-only-snippets/response.file.test.js
@@ -107,7 +107,7 @@ it("Bun.file", async () => {
});
it("Bun.file as a Blob", async () => {
- const filePath = path.join(import.meta.url, "../fetch.js.txt");
+ const filePath = path.join(import.meta.path, "../fetch.js.txt");
const fixture = fs.readFileSync(filePath, "utf8");
// this is a Blob object with the same interface as the one returned by fetch
// internally, instead of a byte array, it stores the file path!
diff --git a/integration/bunjs-only-snippets/transpiler.test.js b/integration/bunjs-only-snippets/transpiler.test.js
index 4759b17c9..268ebfd8b 100644
--- a/integration/bunjs-only-snippets/transpiler.test.js
+++ b/integration/bunjs-only-snippets/transpiler.test.js
@@ -23,7 +23,7 @@ describe("Bun.Transpiler", () => {
// Explicitly remove the top-level export, even if it is in use by
// another part of the file
- eliminate: ["loader"],
+ eliminate: ["loader", "localVarToRemove"],
},
/* only per-file for now, so this isn't good yet */
treeShaking: true,
@@ -36,8 +36,6 @@ describe("Bun.Transpiler", () => {
});
it("a deletes dead exports and any imports only referenced in dead regions", () => {
- console.log("b");
-
const out = transpiler.transformSync(`
import {getUserById} from './my-database';
@@ -50,9 +48,6 @@ describe("Bun.Transpiler", () => {
return <div id='user'>{user.name}</div>;
}
`);
-
- // when all three flags are set, it means
- console.log(out);
});
it("deletes dead exports and any imports only referenced in dead regions", () => {
@@ -104,7 +99,6 @@ describe("Bun.Transpiler", () => {
require("bar");
}
`);
- console.log(output);
expect(output.includes("loader")).toBe(false);
expect(output.includes("react")).toBe(false);
expect(output.includes("deadFS")).toBe(false);