9 ms·
I've always liked testing ajax requests with sinon [1]. It injects its own version of an XMLHttpRequest object to keep track of all requests, and you can also s
by griffindy 14y ago
I've always liked testing ajax requests with sinon [1]. It injects its own version of an XMLHttpRequest object to keep track of all requests, and you can also send specific responses to test success and failure handling.
[1] http://sinonjs.org/docs/#useFakeXMLHttpRequest http://sinonjs.org/docs/#useFakeXMLHttpRequest