test: stabilize windows pty expectations

This commit is contained in:
Peter Steinberger
2026-01-17 08:07:27 +00:00
parent 8f1132e8ec
commit cccd7c7b8e
2 changed files with 3 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ afterEach(() => {
test("exec supports pty output", async () => {
const tool = createExecTool({ allowBackground: false });
const result = await tool.execute("toolcall", {
command: "node -e 'process.stdout.write(\"ok\")'",
command: "node -e \"process.stdout.write('ok')\"",
pty: true,
});

View File

@@ -64,7 +64,8 @@ test("process submit sends Enter for pty sessions", async () => {
sessionId,
});
for (let i = 0; i < 10; i += 1) {
const deadline = Date.now() + (process.platform === "win32" ? 4000 : 2000);
while (Date.now() < deadline) {
await wait(50);
const poll = await processTool.execute("toolcall", { action: "poll", sessionId });
const details = poll.details as { status?: string; aggregated?: string };