From 7cd93e667059d4de5250d46ec109b696cd951603 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 21 Mar 2022 06:32:14 -0700 Subject: [bun.js] 2/? Implement `Response.file`, sendfile edition --- .../bunjs-only-snippets/response.file.test.js | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'integration/bunjs-only-snippets/response.file.test.js') diff --git a/integration/bunjs-only-snippets/response.file.test.js b/integration/bunjs-only-snippets/response.file.test.js index 442a527f2..7b818405a 100644 --- a/integration/bunjs-only-snippets/response.file.test.js +++ b/integration/bunjs-only-snippets/response.file.test.js @@ -26,24 +26,3 @@ it("Response.file as a blob", async () => { Bun.gc(true); await new Promise((resolve) => setTimeout(resolve, 1)); }); - -it("Response.file as a blob", async () => { - const file = path.join(import.meta.url, "../fetch.js.txt"); - var response = Response.file(file); - var blob = await response.blob(); - - expect(blob.size).toBe(0); - expect(await blob.text()).toBe(fs.readFileSync(file, "utf8")); - expect(blob.size).toBe(1256); - expect(await blob.text()).toBe(fs.readFileSync(file, "utf8")); - const array = new Uint8Array(await blob.arrayBuffer()); - const text = fs.readFileSync(file, "utf8"); - for (let i = 0; i < text.length; i++) { - expect(array[i]).toBe(text.charCodeAt(i)); - } - expect(blob.size).toBe(1256); - blob = null; - response = null; - Bun.gc(true); - await new Promise((resolve) => setTimeout(resolve, 1)); -}); -- cgit v1.2.3 ion value='ciro/http2'>ciro/http2 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/js/builtins/WritableStreamDefaultController.ts (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-08-31insert `enumerable: true` when neededGravatar Dylan Conway 2-11/+120
2023-08-31`bun install` correctly join dependency URLs (#4421)Gravatar Julian 6-64/+243
2023-08-31get name if not provided in `FormData.append` (#4434)Gravatar Dylan Conway 4-5/+45
2023-08-31export non-enumerable valuesGravatar Dylan Conway 2-4/+79
2023-08-31Fix vscode debug terminalGravatar Ashcon Partovi 1-21/+0