/** * Simple shell command runner for test assertions. */ export interface ShellResult { stdout: string; stderr: string; exitCode: number; } export async function shell( command: string, args: string[] ): Promise { const proc = Bun.spawn([command, ...args], { stdout: "pipe", stderr: "pipe", }); const [stdout, stderr, exitCode] = await Promise.all([ new Response(proc.stdout).text(), new Response(proc.stderr).text(), proc.exited, ]); return { stdout, stderr, exitCode }; }