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