Access
Included
Transcript
Available

To intercept any WebSocket connection in your app, create a WebSocket link using the ws.link() API from MSW. Provide it a URL predicate and store the link in a variable. Then, add the connection event listener to your WebSocket link to know when a connection is being established. Provide the result of that event listener to your handlers array, and you're good to go!

Resources