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

Same stale invariant the ui-tui test had: since the shared channel sends one
client.capabilities frame on every gateway.ready, "no frames" is no longer
what this case guards. What it guards is that an older backend without
heartbeat gets no gateway.ping and stays open, so assert the wire holds
exactly the advertisement.
This commit is contained in:
teknium1
2026-09-16 22:42:29 -07:00
committed by Teknium
parent f7e70e954e
commit 6c057dbaa5

View File

@@ -126,6 +126,9 @@ describe('JsonRpcGatewayClient heartbeat recovery', () => {
await vi.advanceTimersByTimeAsync(1_000)
expect(client.connectionState).toBe('open')
expect(socket.readyState).toBe(FakeSocket.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'])
})
})