fetch-mock
Advanced tools
Comparing version 8.1.0 to 8.2.0-beta.1
@@ -1,2 +0,5 @@ | ||
const fetch = require('node-fetch'); | ||
// avoid circular dependency when using jest.mock() | ||
const fetch = global.jest | ||
? global.jest.requireActual('node-fetch') | ||
: require('node-fetch'); | ||
const Request = fetch.Request; | ||
@@ -3,0 +6,0 @@ const Response = fetch.Response; |
@@ -13,3 +13,4 @@ 'use strict'; | ||
var fetch = require('node-fetch'); | ||
// avoid circular dependency when using jest.mock() | ||
var fetch = global.jest ? global.jest.requireActual('node-fetch') : require('node-fetch'); | ||
var Request = fetch.Request; | ||
@@ -16,0 +17,0 @@ var Response = fetch.Response; |
{ | ||
"name": "fetch-mock", | ||
"type": "module", | ||
"version": "8.1.0", | ||
"version": "8.2.0-beta.1", | ||
"description": "Mock http requests made using fetch (or isomorphic-fetch)", | ||
@@ -6,0 +6,0 @@ "main": "./cjs/server.js", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2613937
74597
1