Closed DenyVeyten closed 5 days ago
Hi, @DenyVeyten. Thanks for reporting this!
Yes, you have to call .apply()
to enable any interceptor. RemoteHttpResolver
extends that model. Looks like a documentation issue to me.
Would you like to open a pull request to README to fix this?
This has been released in v0.30.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.
Example in README: https://github.com/mswjs/interceptors/blob/e822e14bc669a7e5cefa9b9b0f627ea37c76ba99/README.md?plain=1#L524-L539
Missing line: https://github.com/mswjs/interceptors/blob/e822e14bc669a7e5cefa9b9b0f627ea37c76ba99/test/features/remote/remote.test.ts#L33
Took me plenty of time to find out that
RemoteHttpResolver
starts working only afterresolver.apply()
has been called.