Closed Krinkle closed 9 years ago
Stumbled upon the same issue. Would be really nice to fix the API, or at the very least to update the docs…
I am seeing something similar
That does indeed look strange. I can't really remember the reasoning behind this, but I am open to fix it. Sinon has 80 contributors, more are always welcome ;)
Hi! Is ther any new version fixing this issue?
Hi, even the new version use this:
sinon.sandbox.useFakeXMLHttpRequest = sinon.sandbox.useFakeServer;
?
This seems rather confusing, was this on purpose or is this a bug?
lib/sinon/sandbox.js#L120:
As a result, code like the following (based on sinon-qunit documentation) doesn't actually work:
.. because that attaches a spurious
onCreate
method to the server object. The fake xhr manager is actually inxhr.xhr
and the code is fixed when changed toxhr.xhr.onCreate = function () { .. }
.