{"library":"vitest-mock-socket","type":"library","category":null,"description":"A library to mock and assert WebSocket interactions in Vitest tests. Version 2.1.0 is current, released with support for Vitest 2+ and Node >=24. It intercepts global WebSocket connections and provides an API to simulate server events, send/receive messages, and assert on WebSocket state. Compared to alternatives like mock-socket, it is tailored for Vitest, integrates with Vitest's test lifecycle, and ships TypeScript definitions. Low release cadence, focused on stability.","language":"javascript","status":"active","version":"2.1.0","tags":["javascript","vitest","websocket","websockets","mock-socket","vitest-mock-socket","test","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install vitest-mock-socket","imports":["import { createMockServer } from 'vitest-mock-socket'","import { mockWebSocket } from 'vitest-mock-socket'","import type { WebSocketMockServer } from 'vitest-mock-socket'"]},{"cmd":"yarn add vitest-mock-socket","imports":[]},{"cmd":"pnpm add vitest-mock-socket","imports":[]}],"homepage":"https://github.com/andrewangelle/vitest-mock-socket#readme","github":"https://github.com/andrewangelle/vitest-mock-socket","docs":null,"changelog":null,"pypi":null,"npm":"vitest-mock-socket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}