perf: add zero-delay gateway client connect for tests

This commit is contained in:
Peter Steinberger
2026-02-13 19:31:05 +00:00
parent 5645f227f6
commit c801ffdf99
5 changed files with 13 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ describe("GatewayClient", () => {
const closed = new Promise<{ code: number; reason: string }>((resolve) => {
const client = new GatewayClient({
url: `ws://127.0.0.1:${port}`,
connectDelayMs: 0,
onClose: (code, reason) => resolve({ code, reason }),
});
client.start();
@@ -158,6 +159,7 @@ r1USnb+wUdA7Zoj/mQ==
}, 2000);
client = new GatewayClient({
url: `wss://127.0.0.1:${port}`,
connectDelayMs: 0,
tlsFingerprint: "deadbeef",
onConnectError: (err) => {
clearTimeout(timeout);