test(tools): remove unsafe test assertions

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-12 14:23:05 +09:00
parent 8b093a1115
commit fb135d047c
24 changed files with 199 additions and 156 deletions
+6 -6
View File
@@ -30,7 +30,7 @@ describe("pollSessionUntilIdle", () => {
{ data: { ses_test: { type: "idle" } } },
])
await pollSessionUntilIdle(client as any, "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
await pollSessionUntilIdle(testCoerce(client), "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
expect(client.session.status).toHaveBeenCalledTimes(3)
})
@@ -43,7 +43,7 @@ describe("pollSessionUntilIdle", () => {
{ data: {} },
])
await pollSessionUntilIdle(client as any, "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
await pollSessionUntilIdle(testCoerce(client), "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
expect(client.session.status).toHaveBeenCalledTimes(1)
})
@@ -57,7 +57,7 @@ describe("pollSessionUntilIdle", () => {
])
await expect(
pollSessionUntilIdle(client as any, "ses_test", { pollIntervalMs: 10, timeoutMs: 50 })
pollSessionUntilIdle(testCoerce(client), "ses_test", { pollIntervalMs: 10, timeoutMs: 50 })
).rejects.toThrow("timed out")
})
@@ -69,7 +69,7 @@ describe("pollSessionUntilIdle", () => {
{ error: new Error("API error") },
])
await pollSessionUntilIdle(client as any, "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
await pollSessionUntilIdle(testCoerce(client), "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
expect(client.session.status).toHaveBeenCalledTimes(1)
})
@@ -85,7 +85,7 @@ describe("pollSessionUntilIdle", () => {
{ data: {} },
])
await pollSessionUntilIdle(client as any, "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
await pollSessionUntilIdle(testCoerce(client), "ses_test", { pollIntervalMs: 10, timeoutMs: 5000 })
expect(client.session.status).toHaveBeenCalledTimes(4)
})
@@ -98,7 +98,7 @@ describe("pollSessionUntilIdle", () => {
{ data: {} },
])
await pollSessionUntilIdle(client as any, "ses_test")
await pollSessionUntilIdle(testCoerce(client), "ses_test")
expect(client.session.status).toHaveBeenCalledTimes(1)
})