diff options
Diffstat (limited to 'integration/bunjs-only-snippets/response.file.test.js')
-rw-r--r-- | integration/bunjs-only-snippets/response.file.test.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/response.file.test.js b/integration/bunjs-only-snippets/response.file.test.js index 6e1191433..d094c0a62 100644 --- a/integration/bunjs-only-snippets/response.file.test.js +++ b/integration/bunjs-only-snippets/response.file.test.js @@ -2,6 +2,14 @@ import fs from "fs"; import { it, expect } from "bun:test"; import path from "path"; +it("Bun.file not found returns ENOENT", async () => { + try { + await Bun.file("/does/not/exist.txt").text(); + } catch (exception) { + expect(exception.code).toBe("ENOENT"); + } +}); + it("Bun.write('out.txt', 'string')", async () => { for (let erase of [true, false]) { if (erase) { |