{"library":"jest-websocket-mock","type":"library","category":null,"description":"A library for mocking WebSocket servers in Jest tests. Version 2.5.0 is the current stable release with no fixed cadence. It provides a WS class to simulate a WebSocket server, track messages, and assert interactions. Supports JSON protocol auto-serialization, error simulation, and graceful close. Ships TypeScript definitions. Key differentiators: built-in connected/closed/nextMessage promises for async test flow, static clean() method to reset between tests, and compatibility with popular patterns like redux-saga and react hooks via example code.","language":"javascript","status":"active","version":"2.5.0","tags":["javascript","jest","websocket","mock","unit-testing","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install jest-websocket-mock","imports":["import WS from 'jest-websocket-mock'","const WS = require('jest-websocket-mock')","import WS from 'jest-websocket-mock'"]},{"cmd":"yarn add jest-websocket-mock","imports":[]},{"cmd":"pnpm add jest-websocket-mock","imports":[]}],"homepage":"https://github.com/romgain/jest-websocket-mock#readme","github":"https://github.com/romgain/jest-websocket-mock","docs":null,"changelog":null,"pypi":null,"npm":"jest-websocket-mock","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}