karma-runner / karma-runner/karma-coverage

hangs karma

Open
#209 6 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
771
Forks
242
PR merge metrics
No merged PRs in 30d

Description

when starting karma with callback:

``` javascript
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:

``` javascript
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 ?

Contributor guide

Open the contributing guide

Research direction

Reproduce the hang with the shown karma.conf.js, test.js, PhantomJS, and the coverage reporter, then compare it with runs that omit the Server callback or coverage. Start at the karma.Server(opts, callback).start() entry point and the coverage reporter configuration. Done means the process exits normally with both the callback and coverage enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.