import { WebSocketClient } from '@/lib/websocket/client' describe('WebSocketClient', () => { let client: WebSocketClient beforeEach(() => { client = new WebSocketClient('ws://localhost:3011') }) afterEach(() => { client.disconnect() }) it('should initialize WebSocket client', () => { expect(client).toBeDefined() expect(client.isConnected()).toBe(false) }) it('should track queue length when disconnected', () => { expect(client.getQueueLength()).toBe(0) client.send('highlight:create', { verseId: 'v-1', color: 'yellow' }) expect(client.getQueueLength()).toBe(1) }) it('should get client ID', () => { const clientId = client.getClientId() expect(clientId).toBeDefined() expect(clientId.startsWith('client-')).toBe(true) }) it('should provide connection status', () => { expect(client.isConnected()).toBe(false) }) })