import { describe, expect, test } from "bun:test";
import { runCommand } from "./orchestrator";

describe("runCommand", () => {
	test("runs a command and returns stdout", async () => {
		const result = await runCommand("echo", ["hello"]);
		expect(result.stdout.trim()).toBe("hello");
		expect(result.exitCode).toBe(0);
	});

	test("returns non-zero exit code on failure", async () => {
		const result = await runCommand("false", []);
		expect(result.exitCode).not.toBe(0);
	});
});
