(sessionId: string, timeoutMs: number = 15_000)
| 1411 | } |
| 1412 | |
| 1413 | async waitForSessionActive(sessionId: string, timeoutMs: number = 15_000): Promise<boolean> { |
| 1414 | const start = Date.now() |
| 1415 | while (Date.now() - start < timeoutMs) { |
| 1416 | const session = this.getSession(sessionId) |
| 1417 | if (session?.active) { |
| 1418 | return true |
| 1419 | } |
| 1420 | await new Promise((resolve) => setTimeout(resolve, 250)) |
| 1421 | } |
| 1422 | return false |
| 1423 | } |
| 1424 | |
| 1425 | async waitForSessionInactive(sessionId: string, timeoutMs: number = 15_000): Promise<boolean> { |
| 1426 | const start = Date.now() |
no test coverage detected