From 978e84187db0749806130cef1162fb56d019604f Mon Sep 17 00:00:00 2001 From: Eli Sherer Date: Wed, 24 May 2017 15:56:27 +0300 Subject: [PATCH] Remove abort mock (checked on superagent). Add .idea to gitignore. (#61) --- .gitignore | 1 + src/superagent-mock.js | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) 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; } }; };