()
| 100 | }, 60000) // 60 seconds timeout for startup |
| 101 | |
| 102 | const check = async (): Promise<void> => { |
| 103 | try { |
| 104 | // Try the healthz endpoint first, then fall back to root |
| 105 | const res = await fetch(`${url}/api/healthcheck`) |
| 106 | if (res.ok) { |
| 107 | clearTimeout(timeout) |
| 108 | return resolve() |
| 109 | } |
| 110 | } catch {} |
| 111 | |
| 112 | setTimeout(() => void check(), 500) |
| 113 | } |
| 114 | |
| 115 | void check() |
| 116 | }) |
no test coverage detected