(
dir: string,
runtimeServicesInfo: string,
)
| 388 | |
| 389 | describe("runtime services info exposure", () => { |
| 390 | async function startServerWithRuntimeInfo( |
| 391 | dir: string, |
| 392 | runtimeServicesInfo: string, |
| 393 | ) { |
| 394 | const server = await startStaticServer({ |
| 395 | port: 0, |
| 396 | host: "127.0.0.1", |
| 397 | dir, |
| 398 | routes: {}, |
| 399 | runtimeServicesInfo, |
| 400 | }); |
| 401 | servers.push(server); |
| 402 | const address = server.address(); |
| 403 | if (!address || typeof address === "string") { |
| 404 | throw new Error("Static server did not bind to a TCP port"); |
| 405 | } |
| 406 | return `http://127.0.0.1:${address.port}`; |
| 407 | } |
| 408 | |
| 409 | // Legacy compatibility for older Docker / published-binary frontend |
| 410 | // bundles, which read runtime services from this injected window global. |
no test coverage detected