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
The test only runs over the function index. But as you can see the results are a 100% and marks only the first row of the file with a green color.
I have seen cases where istanbul shows correctly the coverage values, I have changed the test and the source but nothing.
I also have this karma configuration:
module.exports=function(config){config.set({//logLevel: 'LOG_DEBUG',reporters: ['spec','coverage'],// Continuous Integration mode// if true, Karma captures browsers, runs the tests and exitssingleRun : true,autoWatch : false,// base path that will be used to resolve all patterns (eg. files, exclude)basePath: '',port: 9876,// frameworks to use// available frameworks: https://npmjs.org/browse/keyword/karma-adapterframeworks: ['mocha','browserify'],files: ['src/**/*.js','test/*.js'],// list of files to excludeexclude: [],preprocessors: {'src/**/*.js': ['browserify','coverage'],'test/**/*.js': ['browserify']},coverageReporter: {reporters: [{type: 'html'},{type: 'text'},{type: 'lcovonly'}],instrumenterOptions: {istanbul: {noCompact: true}},instrumenter: {'test/**/*.js': 'istanbul'},includeAllSources: true},// enable / disable colors in the output (reporters and logs)colors: true,// start these browsers// available browser launchers: https://npmjs.org/browse/keyword/karma-launcherbrowsers: ['PhantomJS2']});};
If you ran the tests you will see that it actually works fine, but the coverage report is not correct.
I need some help regarding Karma with browserify coverage. I created a repo with the test I am running in here:
https://github.com/jotaoncode/web-istanbul
The results on my coverage are the following:
The test only runs over the function index. But as you can see the results are a 100% and marks only the first row of the file with a green color.
I have seen cases where istanbul shows correctly the coverage values, I have changed the test and the source but nothing.
I also have this karma configuration:
If you ran the tests you will see that it actually works fine, but the coverage report is not correct.
I also created this ticket http://stackoverflow.com/questions/33422910/karma-coverage-fails-to-show-correct-results
Thank you very much for your help.
The text was updated successfully, but these errors were encountered: