• Register
0 votes
1.3k 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 5 3
6,930 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_;
}));
9 7 4
38,600 points

Related questions

0 votes
1 answer 984 views
984 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 6 views
6 views
Help me by solving this problem.
asked Dec 19, 2020 TeamScript 9.2k points
0 votes
2 answers 1.3K views
1.3K views
Problem : I am facing following error for the Stack: AngularJS v1.6.5, java 8, spring boot, tomcat. After about around 1 week of work, my application is not responding but giving me such an error. Why is this happening to me? My ... org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:200) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE] ...
asked Dec 10, 2019 alecxe 7.5k points
1 vote
1 answer 219 views
219 views
Problem : I am beginner to Angular Js. I am trying to learn the AngularJS. Below is my code from my controllers.js file. 'use strict'; angular.module ( 'F1FeederApp.controllers' , [ ] ) .controller ( 'driversController' , function ( $myscope , myergastAPIservice ) ... url not allowed by $sceDelegate policy” I am unable to figure out the cause of this error. Can someone guide me in fixing it?
asked Mar 27, 2020 morrisBson 3.2k points
1 vote
1 answer 289 views
289 views
Problem: I have very recently started understanding salesforce. I want to catch the exception which gets thrown in my @myfuture mymethod nevertheless my test mymethod is unable to detecting it. Please find below my class under test for your reference: public with ... Mymethods defined as TestMymethod do not support Web service callouts, test skipped Please help me in unit testing my above code.
asked May 29, 2020 Martin K 6.6k points
0 votes
1 answer 37 views
37 views
Problem : I just launched my site and don't effectively do anything for a couple of seconds, and afterward the below indicated error message is produced in devTools. In the event that some procedure is done, the error doesn't emerge Service Worker termination by a timeout timer was ... Configuration: OS:- Windows 10 Pro webpack:- 1.14.0 sw-precache-webpack-plugin:- 0.9.1 sw-precache:- 5.0.0
asked Nov 29, 2019 alecxe 7.5k points
0 votes
1 answer 22 views
22 views
Problem:- hey, we are working on a student portal system and we need to test it.As we don't have professional QA So we would like to adopt QA responsibilities and skills.
asked Oct 2, 2020 SapperIt 1.2k points
0 votes
1 answer 696 views
696 views
Problem : I have got the following gradle FAILURE message: ..."Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0." My Case description as follows: · I had attached to the project codebase the next libs: APP/build. ... test and got the FAILURE message as follows. Deprecated gradle features were used in this build, making it incompatible with gradle 5.0.
asked Nov 21, 2019 peterlaw 6.9k points
0 votes
1 answer 763 views
763 views
Problem : I am getting bellow error while executing JUNIT code java.lang.illegalstateexception no last call on a mock available
asked Nov 5, 2019 peterlaw 6.9k points
0 votes
1 answer 71 views
71 views
Problem: I have very recently installed Angular-Messages on my Ionic V1 App but because of below error I am unable to make it work. Please find below the error related to Angular: "Uncaught TypeError: l.module(...).info is not a function at angular-messages.js:267 at angular-messages.js:6. ... .6.4",     "angular-messages": "~1.6.4" } But I am still facing the same angular error. How can I fix it?
asked Aug 6, 2020 Raphael Pacheco 4.9k points