(
dir: string,
runtimeServicesInfo: string,
)
| 330 | |
| 331 | describe("runtime services info exposure", () => { |
| 332 | async function startServerWithRuntimeInfo( |
| 333 | dir: string, |
| 334 | runtimeServicesInfo: string, |
| 335 | ) { |
| 336 | const server = await startStaticServer({ |
| 337 | port: 0, |
| 338 | host: "127.0.0.1", |
| 339 | dir, |
| 340 | routes: {}, |
| 341 | runtimeServicesInfo, |
| 342 | }); |
| 343 | servers.push(server); |
| 344 | const address = server.address(); |
| 345 | if (!address || typeof address === "string") { |
| 346 | throw new Error("Static server did not bind to a TCP port"); |
| 347 | } |
| 348 | return `http://127.0.0.1:${address.port}`; |
| 349 | } |
| 350 | |
| 351 | // Legacy compatibility for older Docker / published-binary frontend |
| 352 | // bundles, which read runtime services from this injected window global. |
no test coverage detected