refactor(test): dedupe gateway and web scaffolding

This commit is contained in:
Peter Steinberger
2026-02-22 20:02:05 +00:00
parent 5e8b1f5ac8
commit 2dcb244985
17 changed files with 375 additions and 498 deletions

View File

@@ -404,6 +404,15 @@ export async function startServerWithClient(
return { server, ws, port, prevToken: prev, envSnapshot };
}
export async function startConnectedServerWithClient(
token?: string,
opts?: GatewayServerOptions & { wsHeaders?: Record<string, string> },
) {
const started = await startServerWithClient(token, opts);
await connectOk(started.ws);
return started;
}
type ConnectResponse = {
type: "res";
id: string;