(
dir: string,
runtimeServicesInfo: string,
)
| 114 | |
| 115 | describe("runtime services info injection", () => { |
| 116 | async function startServerWithRuntimeInfo( |
| 117 | dir: string, |
| 118 | runtimeServicesInfo: string, |
| 119 | ) { |
| 120 | const server = await startStaticServer({ |
| 121 | port: 0, |
| 122 | host: "127.0.0.1", |
| 123 | dir, |
| 124 | routes: {}, |
| 125 | runtimeServicesInfo, |
| 126 | }); |
| 127 | servers.push(server); |
| 128 | const address = server.address(); |
| 129 | if (!address || typeof address === "string") { |
| 130 | throw new Error("Static server did not bind to a TCP port"); |
| 131 | } |
| 132 | return `http://127.0.0.1:${address.port}`; |
| 133 | } |
| 134 | |
| 135 | // Regression test for the Docker / published-binary path: static builds |
| 136 | // have no VITE_RUNTIME_SERVICES_INFO baked in, so the agent's |
no test coverage detected