mswjs / msw

Industry standard API mocking for JavaScript.
https://mswjs.io
MIT License
15.97k stars 519 forks source link

A way to trigger Web Socket `onerror` before `connection` event #2362

Closed sfc-gh-jtjhin closed 2 days ago

sfc-gh-jtjhin commented 3 days ago

Scope

Improves an existing behavior

Compatibility

Feature description

I'd like to be able to test if the a web socket connection erroring e.g. firewall issue Similar to https://mswjs.io/docs/recipes/network-errors for REST requests