• Register
0 votes

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

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_;
36.1k points

Related questions

0 votes
1 answer 528 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 556 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 67 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 24 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 7 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 2 days ago Raphael Pacheco 2.7k points