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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user