Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma pseudo-reopens PhantomJS connection with asynchronous logging + captureConsole #1908

Open
henryptung opened this issue Feb 16, 2016 · 1 comment

Comments

@henryptung
Copy link

Our frontend code uses Bluebird, which asynchronously logs after tests are run to report unhandled rejections. Looking in Karma's karma.js, it seems these asynchronous logs are just piped down the WebSocket - even if the complete message has already been sent. Karma-side in browser.js, this info event restarts the disconnection timer, despite it having been closed down by the complete handler.

As such, Karma will hang after this happens, and after 10 seconds, a disconnection-due-to-timeout will fire, calling the Karma server's callback a second time (which, in our case, breaks Gulp).

Current workaround is to add captureConsole: false to the Karma client config, though we'd really like to see the logs as well when running via PhantomJS.

@fchiumeo
Copy link

It also happens with zone.js and angular 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants