babel-plugin-istanbul
babel-plugin-istanbul copied to clipboard
Nyc with multiple file extensions option generates no coverage
I've got a project with a mix of .jsx and .js files and have been using nyc by calling nyc -e .jsx _mocha
, all working well enough so far.
Now however I tried to use this good plugin to get better branch coverage on the .jsx files. I've setup my project based on the plugins readme and when I call NODE_ENV=test nyc -e .jsx _mocha
, the mocha tests run through fine but I get no coverage at all (or at least it just outputs
All files|UNKNOWN|UNKNOWN|UKNOWN|UNKNOWN
in the terminal).
Here's an interesting part: If I remove the nyc argument -e .jsx
I do get coverage, but only for .jsx files.
With that information, I've also tried to add a include option to nyc with src/**/*.@(jsx|js)
(thinking the plugin might disregard .js files by default) but still only got coverage for .jsx file.
Any idea what I'm doing wrong or how I get the plugin and nyc together to instrument/cover both file extensions?
Possibly relevant information:
Versions: node: 8.9.4 babel-core: 6.26.0 babel-plugin-istanbul: 4.1.5 nyc: 11.4.1
Babel presets: env, stage-2, react
No further nyc configuration beyond what's required from your readme and the -e
argument.
Any other information required?
Thanks in advance!