Karma/Jasmine times out without running tests

Solution 1:

I had the same problem. From a related GitHub Issue, I learned that you can extend the inactivity timeout.

Set this Karma config option in your gruntfile or karma config file:

browserNoActivityTimeout: 100000

I set it to 100 seconds and my tests ran successfully. I don't know what's causing the delay.

Solution 2:

I've changed my Karma config, to

captureTimeout: 60000, // it was already there
browserDisconnectTimeout : 10000,
browserDisconnectTolerance : 1,
browserNoActivityTimeout : 60000,//by default 10000

Also I have 200-300 tests, PhantomJS 1.9.8 and it needs only about 100 mb memory for Phantom With grunt and karma They all together used about 300mb of memory.