You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Overview of the Issue
In unit test, I use $httpBackend.verifyNoOutstandingRequest(); to make sure that no request was done. The test also passes when the request is done, because verifyNoOutstandingRequest does not trigger digest (in contrary to flush and verifyNoOutstandingExpectation) which leads to unpropagated Unexpected request error.
There is a comment asking whether calling digest should be added to verifyNoOutstandingRequest as well, but with no response.
Use Case - testing that $http request is not being done Angular Version - 1.4.8 Reproduce the Error
it('should not allow submitting invalid form',function(){varctrl=createCtrl();ctrl.submit();$httpBackend.verifyNoOutstandingRequest();});
The text was updated successfully, but these errors were encountered:
katemihalikova
changed the title
$httpBackend.verifyNoOutstandingRequest() fails to throw when digest is not triggered
$httpBackend.verifyNoOutstandingRequest fails to throw when digest is not triggered
Dec 11, 2015
Sounds like a reasonable change (if nothing else, restores consistency with verfiyNoOustandingExpectations() and flush()). It will be a BC, though - might be a good candidate for v1.6.x.
@katemihalikova, would you like to take a stub at it (and see how much it breaks our testsuite 😃) ?
Overview of the Issue
In unit test, I use
$httpBackend.verifyNoOutstandingRequest();
to make sure that no request was done. The test also passes when the request is done, becauseverifyNoOutstandingRequest
does not trigger digest (in contrary toflush
andverifyNoOutstandingExpectation
) which leads to unpropagated Unexpected request error.There is a comment asking whether calling digest should be added to
verifyNoOutstandingRequest
as well, but with no response.Use Case - testing that
$http
request is not being doneAngular Version - 1.4.8
Reproduce the Error
The text was updated successfully, but these errors were encountered: