• Register
0 votes
923 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

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 749 views
749 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 jwilliam 3.9k points
0 votes
2 answers 851 views
851 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 134 views
134 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 morrisBson 3.2k points
1 vote
1 answer 79 views
79 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 Martin K 6.6k points
0 votes
1 answer 34 views
34 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