fetch-mock
Version:
Mock http requests made using fetch (or isomorphic-fetch)
16 lines (12 loc) • 386 B
JavaScript
;
if (typeof window === 'undefined') {
throw 'Incorrect fetch-mock: require(\'fetch-mock/server\') in nodejs >= 4, or require(\'fetch-mock/es5/server\' in nodejs 0.12.x';
}
const FetchMock = require('./fetch-mock');
module.exports = new FetchMock({
theGlobal: window,
Response: window.Response,
Headers: window.Headers,
Blob: window.Blob,
debug: function () {}
});