Fix flaky stdin test: use Buffer instead of ReadableStream

This commit is contained in:
Danila Poyarkov 2026-03-04 15:28:04 +03:00
parent b3b3e6256d
commit c365f9f3b9

View file

@ -12,7 +12,7 @@ async function run(args: string[], stdin?: string): Promise<{ stdout: string; st
const proc = Bun.spawn(['bun', CLI, ...args], {
stdout: 'pipe',
stderr: 'pipe',
stdin: stdin ? new Response(stdin).body! : undefined,
stdin: stdin ? Buffer.from(stdin) : undefined,
})
const [stdout, stderr] = await Promise.all([
new Response(proc.stdout).text(),