karma-runner / karma-runner/karma-coverage
Karma-coverage with browserify does not return any data when executed on linux
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
I'm facing a strange problem:
On windows machine I'm able to get lcov report generated by karma-coverage just fine but when code is deployed to ubuntu instance I'm getting 100% 0/0 in the summary report and lcov file is empty.
Here is my karma.conf file:
```
'use strict';
var istanbul = require('browserify-istanbul');
var tascMock = 'test/tasc.mock.js';
var mainJs = 'src/main/webapp/app/_global/main.js';
var configOptions = {
basePath: '../',
frameworks: ['jasmine', 'browserify'],
preprocessors: {},
plugins: ['karma-jasmine', 'karma-mocha-reporter', 'karma-phantomjs-launcher', 'karma-chrome-launcher', 'karma-browserify', 'karma-coverage', 'karma-junit-reporter'],
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage', 'junit'],
coverageReporter: {
reporters: [{
type: 'text-summary'
}, {
type: 'lcov',
dir: 'test/reports',
subdir: 'coverage'
}, ]
},
browserify: {
transform: [
'bulkify',
istanbul({
ignore: ['**/node_modules/**', '**/lib/**', '**/on_config.js', '**/on_run.js']
})
]
},
junitReporter: {
outputDir: 'test/reports/junit',
suite: ''
},
files: [
'src/main/webapp/build/js/lib.js',
'src/main/webapp/lib/angular-mocks/angular-mocks.js',
tascMock,
mainJs,
'src/main/webapp/build/js/templates.js',
// test files
'src/main/webapp/app/**/*.spec.js'
],
colors: true
};
configOptions.preprocessors[mainJs] = ['browserify'];
module.exports = function(config) {
config.set(configOptions);
}
```
Contributor guide
Assessment
This issue has not been assessed yet.