Problems with Mocha
Opened this issue · 4 comments
Issue for that: #81 (comment)
I have the same problem. I temporarily fixed it like this:
"scripts": {
"coverage": "babel-node ./node_modules/.bin/isparta cover _mocha index.js -- --require babel-core/register"
}
But I dont think it's looks so elegant.
this is working
"coverage": "babel-node ./node_modules/.bin/isparta cover _mocha index.js -- --compilers js:babel-core/register",
I'm having some issues with mocha and es2015 as well. It only generates coverage if I include --include-all-sources
as an option, but doesn't actually give full coverage, it only covers the index.js
file and none of the other library files in the project.
Has anyone else seen behavior like this? Working with a bare bones project set up to only have a couple example files and a test framework, so I don't think I've got any extra complications here. If it would help I could link to the project here...
This project may help people. It's working examples of using Babel v6 with popular testing tools like Mocha.
@Jenius, link me to that project and I'll take a look.
Awesome, thanks @jmeas! This is the project I'm working with: https://github.com/jenius/stockfighter-node