hangs karma
See original GitHub issuewhen starting karma with callback:
var karma = require('karma');
var opts = {
configFile: __dirname + '/karma.conf.js',
singleRun: true
};
new karma.Server(opts, () => null).start();
coverage causes the process to hang after running the tests.
using karma.conf.js:
module.exports = function(config) {
config.set({
files: ['test.js'],
frameworks: ['jasmine'],
reporters: ['coverage'],
coverageReporter: {
reporters: [{type: 'text'}]
},
port: 9876,
browsers: ['PhantomJS'],
plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-coverage'
]
})
}
The process exits normally if either: no callback is passed to the Server constructor, or the coverage reporter is disabled.
I notice there is no change in coverage that caused this issue; it may be related to socketio/socket.io#2368 ?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:6
Top Results From Across the Web
Karma freezes randomly when we try to run karma. #3389
Hi all, When i use the default install from: npm init @open-wc karma start randomly freezes, when i put on the debug log...
Read more >Karma hangs at Karma starting - jasmine - Stack Overflow
My test is inside vendor/Jasmine/spec/PlayerSpec.js . Is this the correct way of using karma for testing or are there some more UI-frendly ways?...
Read more >Karma Server Hangs on capturing browser : WEB-33839
Karma Connecting to Chrome Browser and running the tests. What happens instead? Hangs. Throws no errors. Was testing with Karma in Angular 6...
Read more >Karma Gifts, Hanging Bud Vases, Set of 4,Neutral - Amazon.com
DETAILED: These hand painted bud vases are the perfect addition in any place. Hang them inside or on your back patio to add...
Read more >Troubleshooting - Karma test runner
karma has an extensive set of tests and we have limited time to help with bugs. ... How Do I Debug a karma...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this same issue. For me, it seems to be related specifically to the
text-summary
reporter.But after removing the
text-summary
reporter:(Similar results when using the
text
reporter as a substitute fortext-summary
.)Interestingly, it’s not taking that 30sec to produce the coverage output, as the 30sec hang is after the text-summary coverage is output.
At least in our case, this appears to have something to do with console output happening after
text
output is written to the console.e.g.
will hang, but with
it will not…
For us it also seems to specifically hang within
gulp
, making me suspect that perhaps something is going haywire with the output stream…?UPDATE & Workaround: waiting for 3 seconds after test suite completion to make sure any async calls that perform
console.log
execute before the coverage reporter runs successfully gets around the problem.