fogbound.net




Wed, 22 Jul 2015

Error: Timeout – Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

— SjG @ 2:04 pm

No, this site’s not crashing. That’s the error message I was getting when running a Karma test of some Angular / JavaScript code.

The usual suspects (when Googling) is having an argument to your it function. But my it function had no argument.

However, my afterEach function *did* have an argument due to a typo. That was the culprit. If it’s not your it function, it could be your beforeEach or afterEach function. Either one will also cause the entire it function to run asynchronously.

As usual, this is likely obvious to everyone but me. I’m posting this in the off chance someone else has the same problem and is as dumb as I am 🙂


4 responses to “Error: Timeout – Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.”

  1. jdollar says:

    Searched high and low for an answer I was having with this. Ran into similar sources saying that it was probably a argument in my it methods and I was pulling my hair out.

    Similar issue. Argument in my beforeEach function. Didn’t even think to check it out until this post. HUGE help. Spent way too much time trying to figure this one out.

  2. Steve says:

    Thanks for posting this. I never would have noticed that stray done argument that I put into one of my beforeEaches if I hadn’t come across this page!

  3. AleKiller says:

    Can’t believe that was the reason of my problem. Hours of time wasted looking for a solution to this timeout problem and never thought of checking the arguments in one of my beforeEach functions. Thanks alot!

  4. mahejabeen says:

    i still dont understand , can anybody post the code and explain

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.