nyc: filepath bug with nyc & mocha & babel-register@6.11.5
nyc@7.0.0mocha@2.4.5babel-register@6.11.5
In .nyc_output json file content, file path should nyc-mocha-chai/src/index.js but nyc-mocha-chai/src/src/index.js.
Demo: https://github.com/d-band/test-boilerplates/tree/master/nyc-mocha-chai
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 17 (2 by maintainers)
Commits related to this issue
- Correct source map paths for babel-register. (#3523) — committed to babel/babel by rolftimmermans 8 years ago
babel-register 6.11.6 was just released, which reverted the commit that caused the problem. Sorry guys for the troubles.
Problem solved. There are two ways:
babel-register@6.11.6babel-plugin-istanbulKudos to @JaKXz , he fixed my setup and everything is working now! Long story short, and like @kripod mentionned, using
babel-plugin-istanbulsolves the problem.@edmundito I got it working with the configuration below.
package.json:.babelrc:I tried a few things, but the only thing I can confirm that it works with updating all the way to babel-register 6.9.0 (and having the rest of the babel dependencies up to date).
It has to be one of the 2 changes introduced over the weekend: https://github.com/babel/babel/commits/master/packages/babel-register