-
Notifications
You must be signed in to change notification settings - Fork 49
overriding $httpBackend breaks $browser.notifyWhenNoOutstandingRequests #34
Comments
I've got a version that just does:
and it works great |
this way you don't need to worry about tracking $timouts and $http requests because it's done for you and you can just use $browser.notifyWhenNoOutstandingRequests |
Thanks for the suggestion, @graingert! It was originally implemented this way because Now that AngularJS 1 development is kinda ramping down in favor of 2, it's probably safer to assume that Your alternative implementation does seem simpler, though presumably we'd still need to customise |
@apparentlymart ah I don't use JSON-P so I'm safe. |
the other options is to use: angular.getTestability(element).whenStable(callback) where element is the root jsdom document. |
but it just calls $browser.notifyWhenNoOutstandingRequests(callback) so I imagine it's safe. |
there seems to be a lot of code in ngOverrides to count async callbacks when angular already does this in $browser.notifyWhenNoOutstandingRequests
However it turns out the overridden $httpBackend is breaking $browser.notifyWhenNoOutstandingRequests
it would be better to override $xhrFactory
The text was updated successfully, but these errors were encountered: