Closed kettanaito closed 3 months ago
This has been released in v0.34.1!
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.
Per WHATWG WebSocket spec:
This means that regardless of the closure
code
,wasClean
will be true as long as the closing handshake has been performed before that.I translate this as: only closure due to errors are not considered clean.
We should support a
wasClean?: boolean
parameter in the[kClose]
method onWebSocketOverride
so that we can set it tofalse
only in the case when we close the connection with error (e.g. when an unhandled exception occurred in the interceptor).