mswjs / interceptors

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

fix(ClientRequest): immediate abort #464

Closed mikicho closed 2 months ago

mikicho commented 11 months ago

I added failing tests.

  1. Should emit close and then abort events.
  2. Should not call to the request listeners if defined.

Currently, when we do return a mocked response, we get the following error:

TypeError: Cannot set property writableFinished of # which has only a getter

if merged, should fix #444

@kettanaito Let me know WDYT about the desired behavior, and any guidance is welcome. :)

kettanaito commented 11 months ago

I've shared some thoughts on this in here. Would like to know what you think.

kettanaito commented 1 month ago

Released: v0.32.0 🎉

This has been released in v0.32.0!

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.