diff --git a/.gitignore b/.gitignore index 339dada..616564c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules *.log lib es +.idea \ No newline at end of file diff --git a/src/superagent-mock.js b/src/superagent-mock.js index cce2369..7a860d5 100755 --- a/src/superagent-mock.js +++ b/src/superagent-mock.js @@ -13,7 +13,6 @@ module.exports = function (superagent, config, logger) { * Keep the default methods */ const oldEnd = Request.prototype.end; - const oldAbort = Request.prototype.abort; /** * Flush the current log in the logger method and reset it @@ -200,16 +199,9 @@ module.exports = function (superagent, config, logger) { return this; }; - Request.prototype.abort = function () { - this.xhr = this.req = {abort: function () {}}; - - return oldAbort.call(this); - }; - return { unset: function () { Request.prototype.end = oldEnd; - Request.prototype.abort = oldAbort; } }; };