-
Notifications
You must be signed in to change notification settings - Fork 788
'Branch not covered' #582
Comments
Are you using Babel? I've seen this show up when I have a combo of Babel transpilation and Istanbul. |
yes. {
"babel-plugin-transform-runtime": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-stage-1": "^6.5.0",
"babel-register": "^6.7.2",
"babel-runtime": "^6.6.1",
} |
One of the current alpha branches might address that: https://github.com/gotwarlost/istanbul/releases |
I'm still seeing this issue on v0.4.3, which I believe is later than the mentioned alpha releases. |
I have a similar issue (some branches now showing as covered) and I found it curious that everyone here is using After reading this I decided use |
I believe this is because babel replaces |
@QuentinRoy - yes, I think you are right: Babel Transformation Example So for @AshCoolman example for cover all branches you need to provide 2 variants of element:
will run both branches hidden at babel replacement of typeof |
For your information, with ava, I made it work with the following config: .babelrc{
"presets": ["env"],
"env": {
"test": {
"plugins": [ "istanbul" ],
"presets": [["env", { "targets": { "node": "current" } }]]
}
}
} package.json{
// [...]
"ava": {
"require": [
"babel-register"
]
},
"nyc": {
"sourceMap": false,
"instrument": false
}
} |
is it a bug or other?
The text was updated successfully, but these errors were encountered: