refactor: extract shared shell spawn logic into shellRunner.ts (#572)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-16 19:40:45 -08:00
committed by GitHub
parent 0430f42887
commit 00cb68689e
7 changed files with 225 additions and 215 deletions

View File

@@ -24,11 +24,10 @@ describe("RunShellCommand tool (Gemini)", () => {
});
test("throws error when command is missing", async () => {
// Bash tool doesn't validate empty command, so skip this test
// or test that empty command still executes
const result = await run_shell_command({
command: "",
} as Parameters<typeof run_shell_command>[0]);
expect(result.message).toBeTruthy();
await expect(
run_shell_command({
command: "",
} as Parameters<typeof run_shell_command>[0]),
).rejects.toThrow(/non-empty string/);
});
});