Closed kettanaito closed 1 month ago
This has been released in v0.35.9!
Make sure to always update to the latest version (npm i @mswjs/interceptors@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
This may call back to the Node's issue where
MessageEvent
is not cancelable. I can see the same being true for the close event:https://github.com/mswjs/interceptors/blob/2a06bce76dddaeeeb38fc37f2d3e78fbe458ce23/src/interceptors/WebSocket/WebSocketServerConnection.ts#L349
Checking this always yields
false
even ifevent.preventDefault()
has been called on theclose
event on the server object.We currently do a custom
CancelableMessageEvent
for message events. We may want to do the same for theclose
event.