()
| 50 | }, 10000) |
| 51 | |
| 52 | const check = async (): Promise<void> => { |
| 53 | try { |
| 54 | const res = await fetch(`${url}/v1/health`) |
| 55 | if (res.ok) { |
| 56 | const data = (await res.json()) as { status: string } |
| 57 | if (data.status === 'active') { |
| 58 | clearTimeout(timeout) |
| 59 | return resolve() |
| 60 | } |
| 61 | } |
| 62 | setTimeout(() => void check(), 100) |
| 63 | } catch { |
| 64 | setTimeout(() => void check(), 100) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void check() |
| 69 | }) |
no test coverage detected