fetch-mock
Advanced tools
Comparing version 8.2.0-beta.2 to 8.2.1
@@ -71,3 +71,8 @@ const responseBuilder = require('./response-builder'); | ||
const abort = () => { | ||
rej(new AbortError()); | ||
// note that DOMException is not available in node.js; even node-fetch uses a custom error class: https://github.com/bitinn/node-fetch/blob/master/src/abort-error.js | ||
rej( | ||
typeof DOMException !== 'undefined' | ||
? new DOMException('The operation was aborted.', 'AbortError') | ||
: new AbortError() | ||
); | ||
done(); | ||
@@ -74,0 +79,0 @@ }; |
@@ -140,3 +140,4 @@ 'use strict'; | ||
var abort = function abort() { | ||
rej(new AbortError()); | ||
// note that DOMException is not available in node.js; even node-fetch uses a custom error class: https://github.com/bitinn/node-fetch/blob/master/src/abort-error.js | ||
rej(typeof DOMException !== 'undefined' ? new DOMException('The operation was aborted.', 'AbortError') : new AbortError()); | ||
done(); | ||
@@ -143,0 +144,0 @@ }; |
{ | ||
"name": "fetch-mock", | ||
"type": "module", | ||
"version": "8.2.0-beta.2", | ||
"version": "8.2.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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2616228
74635
0