Skip to content

Commit 978e841

Browse files
elishererDevSide
authored andcommitted
Remove abort mock (checked on superagent). Add .idea to gitignore. (#61)
1 parent d3a4040 commit 978e841

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
*.log
33
lib
44
es
5+
.idea

src/superagent-mock.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module.exports = function (superagent, config, logger) {
1313
* Keep the default methods
1414
*/
1515
const oldEnd = Request.prototype.end;
16-
const oldAbort = Request.prototype.abort;
1716

1817
/**
1918
* Flush the current log in the logger method and reset it
@@ -200,16 +199,9 @@ module.exports = function (superagent, config, logger) {
200199
return this;
201200
};
202201

203-
Request.prototype.abort = function () {
204-
this.xhr = this.req = {abort: function () {}};
205-
206-
return oldAbort.call(this);
207-
};
208-
209202
return {
210203
unset: function () {
211204
Request.prototype.end = oldEnd;
212-
Request.prototype.abort = oldAbort;
213205
}
214206
};
215207
};

0 commit comments

Comments
 (0)