jest-websocket-mock
jest-websocket-mock copied to clipboard
Is there a way to simulate a lost connection?
I can see that the library supports close and error, one of which gracefully shuts down the connection, and the other which sends an error message; but I want to simulate the connection abruptly and ungracefully being lost (running out of data, losing wifi, ethernet unplugged, etc). How would I go about doing that?