You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at the moment requests send through this middleware cannot be mocked (through fetch-mock). This is due to the fact, that fetch is imported from isomorphic-fetch rather then using the global fetch function.
The standard defined the fetch function as global. isomorphic-fetch registers it as a global function in nodejs and in the browser.
It would be great if you could just load the module but not import the fetch function. I could also provide a PR for that.
Best,
Christoph
The text was updated successfully, but these errors were encountered:
Not only can fetch not be mocked but this is also causing errors for React Native bundles due to #125 and #5667. It would be best to leave it up to the developer to provide a fetch polyfill. That way, if they have an environment that already implements fetch, this error won't happen.
This doesn't only happen in React Native. It will happen on any environment that already has fetch and requires a package, like redux-api-middleware that also polyfills fetch.
Hi,
at the moment requests send through this middleware cannot be mocked (through fetch-mock). This is due to the fact, that fetch is imported from isomorphic-fetch rather then using the global fetch function.
The standard defined the fetch function as global. isomorphic-fetch registers it as a global function in nodejs and in the browser.
It would be great if you could just load the module but not import the fetch function. I could also provide a PR for that.
Best,
Christoph
The text was updated successfully, but these errors were encountered: