diff options
Diffstat (limited to 'test/bun.js/process-stdio.test.ts')
-rw-r--r-- | test/bun.js/process-stdio.test.ts | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/test/bun.js/process-stdio.test.ts b/test/bun.js/process-stdio.test.ts index df82f5791..6054eeeeb 100644 --- a/test/bun.js/process-stdio.test.ts +++ b/test/bun.js/process-stdio.test.ts @@ -6,8 +6,8 @@ import { isatty } from "tty"; test("process.stdin", () => { expect(process.stdin).toBeDefined(); expect(process.stdout.isTTY).toBe(isatty(0)); - expect(process.stdin.on("close", function() {})).toBe(process.stdin); - expect(process.stdin.once("end", function() {})).toBe(process.stdin); + expect(process.stdin.on("close", function () {})).toBe(process.stdin); + expect(process.stdin.once("end", function () {})).toBe(process.stdin); }); test("process.stdin - read", async () => { @@ -23,12 +23,7 @@ test("process.stdin - read", async () => { }); expect(stdin).toBeDefined(); expect(stdout).toBeDefined(); - var lines = [ - "Get Emoji", - "— All Emojis to ✂️ Copy and 📋 Paste", - "👌", - "", - ]; + var lines = ["Get Emoji", "— All Emojis to ✂️ Copy and 📋 Paste", "👌", ""]; for (let i = 0; i < lines.length; i++) { const line = lines[i]; setTimeout(() => { @@ -57,12 +52,7 @@ test("process.stdin - resume", async () => { }); expect(stdin).toBeDefined(); expect(stdout).toBeDefined(); - var lines = [ - "Get Emoji", - "— All Emojis to ✂️ Copy and 📋 Paste", - "👌", - "", - ]; + var lines = ["Get Emoji", "— All Emojis to ✂️ Copy and 📋 Paste", "👌", ""]; for (let i = 0; i < lines.length; i++) { const line = lines[i]; setTimeout(() => { @@ -100,9 +90,7 @@ test("process.stdout - write", () => { }, }); - expect(stdout?.toString()).toBe( - `hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`, - ); + expect(stdout?.toString()).toBe(`hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`); }); test("process.stdout - write a lot (string)", () => { @@ -119,9 +107,7 @@ test("process.stdout - write a lot (string)", () => { }); expect(stdout?.toString()).toBe( - `hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`.repeat( - 9999, - ), + `hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`.repeat(9999), ); }); @@ -137,8 +123,6 @@ test("process.stdout - write a lot (bytes)", () => { }, }); expect(stdout?.toString()).toBe( - `hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`.repeat( - 9999, - ), + `hello worldhello again|😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌`.repeat(9999), ); }); |