Usually we go with Sinon when trying to stub/fake XHR. But recently we run into a bunch of problems with it when trying to fake XHR2.
It would seem that Sinon is not fully compatible with XHR2 implementation yet. A notable issue is empty xhr.response
(not to be confused with xhr.responseText
). This makes testing XHR2 response much more difficult.
Is there a better alternative out there for XHR2 testing? What's a good starting point for mocking/stubbing XHR2?