Ajax request. Which callback is executed first complete or success?
- by Gutzofter
I could spike this to find out, but I'm going to use SO. In my unit tests (qunit) I use the asynchShould (alias for asynchTest) test. Part of the assertion is to wait for the completion/success of the request. Like this:
asyncShould('talk to customer list server', 1, function() {
stop(2000);
var forCustomerList = newCustomerListRequest();
…