diff --git a/src/fakeRequest.js b/src/fakeRequest.js index 402afcf..753ddae 100644 --- a/src/fakeRequest.js +++ b/src/fakeRequest.js @@ -159,10 +159,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,