From f7bb70c0d5bf880f1596a266a1deb1f45a5a1f33 Mon Sep 17 00:00:00 2001 From: illiptic Date: Sun, 14 Dec 2014 15:12:56 +0100 Subject: [PATCH] concat with changes --- lib/mock-ajax.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/mock-ajax.js b/lib/mock-ajax.js index bef9ab7..b15e175 100644 --- a/lib/mock-ajax.js +++ b/lib/mock-ajax.js @@ -204,10 +204,18 @@ getJasmineRequireObj().AjaxFakeRequest = function() { self = this; this.events[event] = function() { - callback.apply(self); + callback.apply(self, [{}]); existingCallback(); }; }, + + removeEventListener: function(event, callback) { + var existingCallback = this.events[event]; + + if(existingCallback){ + delete this.events[event]; + } + }, status: null,