From f9a00761dc392405032ef79dfaf590576a43af37 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Mon, 26 Jan 2026 12:14:11 +0000 Subject: [PATCH] style: use Buffer.alloc for string generation in test Co-Authored-By: Claude Opus 4.5 --- test/regression/issue/26458.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/regression/issue/26458.test.ts b/test/regression/issue/26458.test.ts index 9c28ac6ce5..e0b36d4633 100644 --- a/test/regression/issue/26458.test.ts +++ b/test/regression/issue/26458.test.ts @@ -12,7 +12,7 @@ import { bunEnv, bunExe } from "harness"; describe("stdin large input handling", () => { // Generate test data larger than the canonical mode buffer limit (~1024 bytes) - const largeInput = "x".repeat(2048); + const largeInput = Buffer.alloc(2048, "x").toString(); test("prompt() handles large input without hanging", async () => { await using proc = Bun.spawn({ @@ -75,7 +75,7 @@ describe("stdin large input handling", () => { }); test("prompt() handles very large input (10KB)", async () => { - const veryLargeInput = "y".repeat(10240); + const veryLargeInput = Buffer.alloc(10240, "y").toString(); await using proc = Bun.spawn({ cmd: [bunExe(), "-e", "console.log(prompt('Enter:').length)"],