From dcdca4944dec1228b6ca38955298c8a541f01378 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 10 Jul 2014 15:36:30 +0200 Subject: [PATCH] Backport SinonJS bugfix for broken splice() in IE8 and es5-shim SinonJS 1.9.1 made use of a rare feature in Array#splice that is implemented in most browsers but not actually part of the ES5 spec. And in IE8 and es5-shimmed environments, the method was 'broken' and thus always yielded an empty array causing none of the XHRs to be responded to. We can't upgrade to SinonJS 1.10 right now due to https://github.com/cjohansen/Sinon.JS/issues/506. Patch source: https://github.com/cjohansen/Sinon.JS/commit/60ab124d21 Change-Id: I8882198b1609cb78f16a8269d40bb19df2df127a --- resources/lib/sinonjs/sinon-1.9.0.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/sinonjs/sinon-1.9.0.js b/resources/lib/sinonjs/sinon-1.9.0.js index 428b729b64..574e617ae7 100644 --- a/resources/lib/sinonjs/sinon-1.9.0.js +++ b/resources/lib/sinonjs/sinon-1.9.0.js @@ -4152,7 +4152,7 @@ sinon.fakeServer = (function () { respond: function respond() { if (arguments.length > 0) this.respondWith.apply(this, arguments); var queue = this.queue || []; - var requests = queue.splice(0); + var requests = queue.splice(0, queue.length); var request; while(request = requests.shift()) { -- 2.20.1