test(ui-tui): the no-heartbeat check expects the capability advertisement

Every gateway.ready now puts one client.capabilities frame on the wire, so
"no frames" is no longer the invariant; "no gateway.ping" is.
This commit is contained in:
teknium1
2026-09-16 22:14:16 -07:00
committed by Teknium
parent f9d178f78e
commit f7e70e954e

View File

@@ -625,7 +625,10 @@ describe('GatewayClient websocket attach mode', () => {
)
await vi.advanceTimersByTimeAsync(WS_HEARTBEAT_DEAD_MS + WS_HEARTBEAT_INTERVAL_MS)
expect(socket.readyState).toBe(FakeWebSocket.OPEN)
expect(socket.sent).toEqual([])
// The one frame on the wire is the client.capabilities advertisement every gateway.ready triggers.
const methods = socket.sent.map(text => (JSON.parse(text) as { method: string }).method)
expect(methods).toEqual(['client.capabilities'])
expect(FakeWebSocket.instances).toHaveLength(1)
} finally {
gw.kill()