(condition: () => boolean, timeoutMs = 1000)
| 20 | } as unknown as Config; |
| 21 | |
| 22 | async function waitForCondition(condition: () => boolean, timeoutMs = 1000): Promise<boolean> { |
| 23 | if (condition()) { |
| 24 | return true; |
| 25 | } |
| 26 | if (timeoutMs <= 0) { |
| 27 | return false; |
| 28 | } |
| 29 | await new Promise((resolve) => setTimeout(resolve, 10)); |
| 30 | return waitForCondition(condition, timeoutMs - 10); |
| 31 | } |
| 32 | |
| 33 | describe("AgentSession.sendMessage (editMessageId)", () => { |
| 34 | let historyCleanup: (() => Promise<void>) | undefined; |
no outgoing calls
no test coverage detected