diff options
author | 2022-03-25 07:27:15 -0700 | |
---|---|---|
committer | 2022-03-25 07:27:15 -0700 | |
commit | 7d84dca254b52d15e77a11faa758a2b14a59f6a7 (patch) | |
tree | 59de59508924d7793d9ea7d99647a68fbee4f204 /integration/bunjs-only-snippets | |
parent | 322780f6495c0231e18c2b1254239d62bc24c037 (diff) | |
download | bun-7d84dca254b52d15e77a11faa758a2b14a59f6a7.tar.gz bun-7d84dca254b52d15e77a11faa758a2b14a59f6a7.tar.zst bun-7d84dca254b52d15e77a11faa758a2b14a59f6a7.zip |
Update response.file.test.js
Diffstat (limited to 'integration/bunjs-only-snippets')
-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) { |