thoov / mock-socket

Javascript mocking library for WebSockets and Socket.IO
MIT License
800 stars 119 forks source link

Bug in ws client mock - wrong close code when server not found #378

Open easy-death opened 1 year ago

easy-death commented 1 year ago

Current native Websocket implementation returns wasClean: false and code: 1006 when wrong url is provided. https://github.com/thoov/mock-socket/blob/eab4bf59ab83298ee42a21fc535a369432fe22c6/src/websocket.js#L94

easy-death commented 1 year ago

@Atrue could you please check, tests passing