You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Karma programmatically with its karma.server.start(config, cb) API. When I run my unit tests on a Selenium Grid the process runs forever, but only if I use a callback. That's why Karma seems to default to process.exit - it doesn't really stop without that. But the way I use it I can't know (and don't want to know) when Karma was called and when to call process.exit. I think this is a bug. It shouldn't be necessary to call process.exit, just to stop Karma.
The text was updated successfully, but these errors were encountered:
I think this could be related to #1788. It randomely stays open for a while, event if cb is called. It would probably work, too, if I could stop my server manually, but it only has a start method.
There were multiple changes targeting this problem and the minimal example works as intended now. I.e. cleans up all resources and exits without a process.exit() call.
constkarma=require('karma')karma.config.parseConfig('karma.conf.js',{},{promiseConfig: true,throwErrors: true}).then((karmaConfig)=>{constserver=newkarma.Server(karmaConfig,functiondoneCallback(exitCode){console.log('Karma has exited with '+exitCode)process.exit(exitCode)})server.start()}).catch((err)=>console.error(err))
If you still experience the problem, please open a new issue with minimal reproduction and we'll look into fixing that specific case as well.
I use Karma programmatically with its
karma.server.start(config, cb)
API. When I run my unit tests on a Selenium Grid the process runs forever, but only if I use a callback. That's why Karma seems to default toprocess.exit
- it doesn't really stop without that. But the way I use it I can't know (and don't want to know) when Karma was called and when to callprocess.exit
. I think this is a bug. It shouldn't be necessary to callprocess.exit
, just to stop Karma.The text was updated successfully, but these errors were encountered: