diff options
author | 2023-05-21 21:31:38 -0700 | |
---|---|---|
committer | 2023-05-21 21:31:38 -0700 | |
commit | 8b3952baf9ae509ca8a420b7604367f973bd3c1f (patch) | |
tree | 451150f0246c0865948fbcb48593f8d552d93e7f | |
parent | 24e0c269d21e6f61e84d782e6ae318561f419f63 (diff) | |
download | bun-8b3952baf9ae509ca8a420b7604367f973bd3c1f.tar.gz bun-8b3952baf9ae509ca8a420b7604367f973bd3c1f.tar.zst bun-8b3952baf9ae509ca8a420b7604367f973bd3c1f.zip |
Fix test
-rw-r--r-- | test/bundler/api.test.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/bundler/api.test.ts b/test/bundler/api.test.ts index dee37dad5..8c8c01b42 100644 --- a/test/bundler/api.test.ts +++ b/test/bundler/api.test.ts @@ -66,6 +66,16 @@ describe("Bun.build", () => { Bun.gc(true); }); + test("Bun.write(BuildArtifact)", async () => { + Bun.gc(true); + const x = await Bun.build({ + entrypoints: [join(import.meta.dir, "./fixtures/trivial/index.js")], + }); + await Bun.write("/tmp/bun-build-test-write.js", x.outputs[0]); + expect(readFileSync("/tmp/bun-build-test-write.js", "utf-8")).toMatchSnapshot(); + Bun.gc(true); + }); + test("rebuilding busts the directory entries cache", () => { Bun.gc(true); const { exitCode, stderr } = Bun.spawnSync({ @@ -188,16 +198,6 @@ describe("Bun.build", () => { // Bun.gc(true); // }); - test("Bun.write(BuildArtifact)", async () => { - Bun.gc(true); - const x = await Bun.build({ - entrypoints: [join(import.meta.dir, "./fixtures/trivial/index.js")], - }); - Bun.write("/tmp/bun-build-test-write.js", x.outputs[0]); - expect(readFileSync("/tmp/bun-build-test-write.js", "utf-8")).toMatchSnapshot(); - Bun.gc(true); - }); - test("new Response(BuildArtifact) sets content type", async () => { const x = await Bun.build({ entrypoints: [join(import.meta.dir, "./fixtures/trivial/index.js")], |