Reputation: 601
I am using karma to run my javascript tests, and to generate a coverage report. Here is my coverage configuration from the karma.conf.js:
coverageReporter: {
dir : 'coverage/',
reporters: [
{ type: 'text-summary' },
{ type: 'html' },
{ type: 'lcov' }
]
}
What I do not like about the set-up is that I always get a subfolder named after the browser used to run the tests. In my case, I use only PhantomJS, and would prefer to have the reports directly under /coverage
. Is there a way to do this?
Upvotes: 1
Views: 741
Reputation: 601
Seems subdir is determined from dir, not from dir/. So this works fine:
coverageReporter: {
dir : 'coverage/',
reporters: [
{ type: 'text-summary' },
{ type: 'html', subdir: '.' },
{ type: 'lcov', subdir: '.' }
]
}
Upvotes: 2