diff options
Diffstat (limited to 'test/bun.js/streams.test.js')
-rw-r--r-- | test/bun.js/streams.test.js | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/test/bun.js/streams.test.js b/test/bun.js/streams.test.js index ec803a9dd..253e4d2f2 100644 --- a/test/bun.js/streams.test.js +++ b/test/bun.js/streams.test.js @@ -1,9 +1,4 @@ -import { - file, - readableStreamToArrayBuffer, - readableStreamToArray, - readableStreamToText, -} from "bun"; +import { file, readableStreamToArrayBuffer, readableStreamToArray, readableStreamToText } from "bun"; import { expect, it, beforeEach, afterEach, describe } from "bun:test"; import { mkfifo } from "mkfifo"; import { unlinkSync, writeFileSync } from "node:fs"; @@ -39,9 +34,7 @@ describe("WritableStream", () => { await writer.close(); - expect(JSON.stringify(Array.from(Buffer.concat(chunks)))).toBe( - JSON.stringify([1, 2, 3, 4, 5, 6]), - ); + expect(JSON.stringify(Array.from(Buffer.concat(chunks)))).toBe(JSON.stringify([1, 2, 3, 4, 5, 6])); } catch (e) { console.log(e); console.log(e.stack); @@ -245,11 +238,7 @@ it("Bun.file() read text from pipe", async () => { const chunks = []; const proc = Bun.spawn({ - cmd: [ - "bash", - join(import.meta.dir + "/", "bun-streams-test-fifo.sh"), - "/tmp/fifo", - ], + cmd: ["bash", join(import.meta.dir + "/", "bun-streams-test-fifo.sh"), "/tmp/fifo"], stderr: "inherit", stdout: null, stdin: null, @@ -463,9 +452,7 @@ it("ReadableStream for Blob", async () => { if (chunk.done) break; chunks.push(new TextDecoder().decode(chunk.value)); } - expect(chunks.join("")).toBe( - new TextDecoder().decode(Buffer.from("abdefghijklmnop")), - ); + expect(chunks.join("")).toBe(new TextDecoder().decode(Buffer.from("abdefghijklmnop"))); }); it("ReadableStream for File", async () => { @@ -481,7 +468,7 @@ it("ReadableStream for File", async () => { } reader = undefined; const output = new Uint8Array(await blob.arrayBuffer()).join(""); - const input = chunks.map((a) => a.join("")).join(""); + const input = chunks.map(a => a.join("")).join(""); expect(output).toBe(input); }); |