Programmers learn & share
0 votes
509 views

Problem :

I am facing following Jasmine issue and looking for solution:

async callback was not invoked within timeout specified by jasmine.default_timeout_interval.

by (6.9k points)   | 509 views

1 Answer

0 votes

Solution :

The issue comes up if following condion is met :

var service;
beforeEach(function(_TestService_) {
    service = _TestService_;
});

To fix the issue just wrap the function with inject to properly retrieve the service:

var service;
beforeEach(inject(function(_TestService_) {
    service = _TestService_;
}));
by (36.1k points)  
2,245 questions
2,807 answers
60 comments
241 users