Hi there,
I'm facing the following error when I run karma with jasmine on my CI server:
Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL
It doesn't happen all times and not with the same tests. So, I believe the CI server is somehow too busy and some tests cannot be completed in less than 5 seconds (normal jasmine timeout interval).
As a workaround, I'm considering to increase jasmine default timeout interval globally. I wouldn't like to modify it as proposed by
jasmine docs:
jasmine.DEFAULT_TIMEOUT_INTERVAL can be set globally, outside of any given describe
It works only if jasmine default timeout interval is set on the first executed test and if test execution order never changes.
The way I found to do it was using
jasmine helper scripts. These scripts are run before all specs. Therefore, I've tried to add it to the client section of karma config:
module.exports = function(config) {
...
config.set({ client: { jasmine: { helpers: [ "helpers/**/*.js"] } }})
...
}
However, it seems karma-jasmine plugin doesn't pass this kind of configuration to jasmine. Digging into karma-jasmine code I found
adapter.js just read random, stopOnFailure, seed and failFast jasmine options.
Is there any other way to do it?
Thank you!