• Register
0 votes
2.1k 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.

6.9k points

Please log in or register to answer this question.

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_;
}));
38.6k points

Related questions

0 votes
1 answer 146 views
146 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.
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 32 views
32 views
Problem: I need help with this : Internal exception io netty handler timeout readtimeoutexception .
asked Mar 20 PkGuy 25.9k points
0 votes
1 answer 32 views
32 views
Problem: I'm using Puppeteer and Jest to run some front end tests. My tests look as follows: describe("Profile Tab Exists and Clickable: /settings/user", () => { test(`Assert that you can click the profile tab`, async () => { await page.waitForSelector( ... This is strange because: I specified the timeout to be 30000 Whether or not I get this error is seemingly very random Why is this happening?
asked Apr 24 Humaira ahmed 50.7k points
0 votes
1 answer 3 views
3 views
Problem: In angularjs, a controller can be tested with
asked Jul 8 asha 121k points
0 votes
1 answer 1.6k views
1.6k views
Problem : Currently I am trying to unit test while developing the simple web with AngularJS + Firebase, but I have the problem defining my spec and trying a test runner My Error: PhantomJS 2.1.1 (Mac OS X 0.0.0) Controller: MainCtrl should.... FAILED Error: [$injector: ... }) But now I am unable to know why this error is occurring. Please let me know how to fix the above error in short time?
asked Jan 24, 2020 jwilliam 3.9k points
0 votes
1 answer 24 views
24 views
Help me by solving this problem.
asked Dec 19, 2020 TeamScript 13.5k points
0 votes
1 answer 9 views
9 views
Problem : Is there any way to rectify this problem: Is not using explicit annotation and cannot be invoked in strict mode?
asked Jun 18 Sifat55 108k points
0 votes
1 answer 16 views
16 views
Problem: Asked few friends but no solution, please help : Mockrestore() works only when mock was created with
asked May 20 Sawyer Parviz 168k points
0 votes
1 answer 5 views
5 views
Problem: [ warn:0] terminating async callback.
asked 5 days ago Rada Gracelynn 104k points
0 votes
1 answer 157 views
157 views
Problem: How to fix this issue: An established connection was aborted by the software in your host machine minecraft
asked Mar 14 Wafa Abu Yousef 6.1k points