mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:24:31 +00:00
refactor(test): dedupe gateway and web scaffolding
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user