(ws)
| 24 | export const pendingDebugLogs = []; |
| 25 | |
| 26 | export function wsReadyStateName(ws) { |
| 27 | if (!ws) return 'null'; |
| 28 | switch (ws.readyState) { |
| 29 | case WebSocket.CONNECTING: return 'CONNECTING'; |
| 30 | case WebSocket.OPEN: return 'OPEN'; |
| 31 | case WebSocket.CLOSING: return 'CLOSING'; |
| 32 | case WebSocket.CLOSED: return 'CLOSED'; |
| 33 | default: return String(ws.readyState); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | export function queueDebugPayload(payload) { |
| 38 | pendingDebugLogs.push(payload); |
no outgoing calls
no test coverage detected