mswjs / interceptors

Low-level network interception library.
https://npm.im/@mswjs/interceptors
MIT License
527 stars 119 forks source link

fix(WebSocket): reassign global to restore WebSocket #514

Closed kettanaito closed 4 months ago

kettanaito commented 4 months ago

Calling .revoke() on a revocable Proxy does not restore its impementation. I was wrong to assume that. It simply blows up the proxy object so any object operations that result in a trap throw.

Also added a test to ensure that the restored WebSocket class is fully operational after the interceptor is disposed.

kettanaito commented 4 months ago

Released: v0.26.7 🎉

This has been released in v0.26.7!

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.