(cleanup: () => Promise<unknown>)
| 325 | }; |
| 326 | |
| 327 | const ignoreCleanupFailure = async (cleanup: () => Promise<unknown>): Promise<void> => { |
| 328 | // oxlint-disable-next-line executor/no-promise-catch -- boundary: startup cleanup is best-effort and must not mask the original startup failure |
| 329 | await cleanup().catch(() => {}); |
| 330 | }; |
| 331 | |
| 332 | export async function startServer(opts: StartServerOptions = {}): Promise<ServerInstance> { |
| 333 | const port = opts.port ?? parseInt(process.env.PORT ?? "4788", 10); |
no test coverage detected