UNPKG

fetch-mock-one.com

Version:

Mock http requests made using fetch (or isomorphic-fetch) (FORK)

17 lines (13 loc) 483 B
require('babel-polyfill'); const FetchMock = require('./lib/index'); const statusTextMap = require('./lib/status-text'); const theGlobal = typeof window !== 'undefined' ? window : self; FetchMock.global = theGlobal; FetchMock.statusTextMap = statusTextMap; FetchMock.config = Object.assign(FetchMock.config, { Promise: theGlobal.Promise, Request: theGlobal.Request, Response: theGlobal.Response, Headers: theGlobal.Headers }); module.exports = FetchMock.createInstance(true);