There is an unresolved HTTP request that needs to be flushed. When I use the following code
afterEach(function(){
$httpBackend.verifyNoOutstandingExpectation();
$httpBackend.verifyNoOutstandingRequest();
});
The code functions correctly and I receive the error message
Error: Unflushed requests: 1
The error is triggered by the
$httpBackend.verifyNoOutstandingRequest();
line. However, if I use the code below instead
afterEach(function(){
$httpBackend.verifyNoOutstandingRequest();
});
No error is generated.
This raises the question of why this behavior occurs. Do both methods need to always be used together?