I start Karma with, basically, node wrapper.js
. That wrapper sets up the configuration including calling karma-coverage
, starting Karma with require('karma').runner.run
. karma-coverage
calls out to Istanbul. (phew!)
I'd like to configure Istanbul with an .istanbul.yml
file, mostly because I want to change the 'reporting watermarks'. Here's what my file looks like.
reporting:
watermarks:
statements: [90, 97]
lines: [90, 97]
functions: [90, 97]
branches: [90, 97]
That looks correct, from what I've seen. But.. it doesn't work. I assume the problem is that istanbul doesn't know the current working directory or somehow this needs to be specified through karma-coverage
.
If it helps, my Karma config.basePath
is simply ''
.
I've attempted to find discussion of this specific problem. Sadly, this question is the closest to my problem, but it's a FAQ entry about "how to name the file". Here's a question/answer discussing this in Grunt, but I wasn't able to extract anything useful.
I also trawled through the karma-runner issues on github, both open and closed. Looking at the source to karma-runner and combining it with this issue from Istanbul, I assume it's not possible because of this line. Am I correct?