A
A
Abc Edc2016-01-25 09:59:39
JavaScript
Abc Edc, 2016-01-25 09:59:39

How to properly loop mock requests in angular tests?

for (var i = 0; i < depRequests.length; i++) {
    $i.httpBackend.expectGET(depRequests[i].path).respond(200, depRequests[i].data);
}
$i.httpBackend.flush();
scope.$apply();

Here is the error at this point
Error: Unsatisfied requests: GET

.Although there are such requests
Or maybe it’s necessary to flash it somehow for the request cycle in a different way?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question