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
Fetch is a different API from XHR. The underlying library of the XHR stubbing, nise, only supports XHR (and so does Sinon). You can check out sinonjs/nise#7 for some tips on how to accomplish stubbing the fetch library.
I am trying to mock HTTP fetch in jsfiddle. I am not sure what I do wrong that makes the result not to be equal to the mock one.
polyfill.js
mocha.js
chai.js
mocha.css
What did you expect to happen?
I want to mock the HTTP fetch function.
What actually happens
It seems it doesn't mock the fetch function.
How to reproduce
Here is my sample code: (You can see the logs in the browser console.)
http://jsfiddle.net/maryam_saeidi/yredb06m/7/
The text was updated successfully, but these errors were encountered: