test: reclassify bash pty suites as unit tests
This commit is contained in:
19
src/agents/bash-tools.exec.pty.test.ts
Normal file
19
src/agents/bash-tools.exec.pty.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { afterEach, expect, test } from "vitest";
|
||||
import { resetProcessRegistryForTests } from "./bash-process-registry.js";
|
||||
import { createExecTool } from "./bash-tools.exec.js";
|
||||
|
||||
afterEach(() => {
|
||||
resetProcessRegistryForTests();
|
||||
});
|
||||
|
||||
test("exec supports pty output", async () => {
|
||||
const tool = createExecTool({ allowBackground: false, security: "full", ask: "off" });
|
||||
const result = await tool.execute("toolcall", {
|
||||
command: 'node -e "process.stdout.write(String.fromCharCode(111,107))"',
|
||||
pty: true,
|
||||
});
|
||||
|
||||
expect(result.details.status).toBe("completed");
|
||||
const text = result.content?.find((item) => item.type === "text")?.text ?? "";
|
||||
expect(text).toContain("ok");
|
||||
});
|
||||
Reference in New Issue
Block a user