( processes: MonitoredBootedProcesses, ready: (signal: AbortSignal) => Promise<A>, )
| 166 | * behind the full HTTP timeout nor leaves a polling timer alive. |
| 167 | */ |
| 168 | export const waitForBoot = async <A>( |
| 169 | processes: MonitoredBootedProcesses, |
| 170 | ready: (signal: AbortSignal) => Promise<A>, |
| 171 | ): Promise<A> => { |
| 172 | const controller = new AbortController(); |
| 173 | try { |
| 174 | return await Promise.race([ready(controller.signal), processes.unexpectedExit]); |
| 175 | } finally { |
| 176 | controller.abort(); |
| 177 | } |
| 178 | }; |
| 179 | |
| 180 | export const waitForHttp = async ( |
| 181 | url: string, |
no test coverage detected