diff options
Diffstat (limited to 'test/bun.js/bun-write.test.js')
-rw-r--r-- | test/bun.js/bun-write.test.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bun.js/bun-write.test.js b/test/bun.js/bun-write.test.js index 7e1d43059..68e221d51 100644 --- a/test/bun.js/bun-write.test.js +++ b/test/bun.js/bun-write.test.js @@ -139,6 +139,14 @@ it("Bun.file", async () => { await gcTick(); }); +it("Bun.file empty file", async () => { + const file = path.join(import.meta.dir, "emptyFile"); + await gcTick(); + const buffer = await Bun.file(file).arrayBuffer() + expect(buffer.byteLength).toBe(0); + await gcTick(); +}); + it("Bun.file as a Blob", async () => { const filePath = path.join(import.meta.path, "../fetch.js.txt"); const fixture = fs.readFileSync(filePath, "utf8"); |