istanbuljs / sample-mocha-compilers

Sample project to demo istanbul coverage with mocha using the babel compiler
7 stars 5 forks source link

report command using coverage dir data generates incorrect report #3

Open scottnonnenberg opened 8 years ago

scottnonnenberg commented 8 years ago
git clone git@github.com:istanbuljs/sample-mocha-compilers.git
npm install # with npm v3.8.2, node v4.3.2
npm run test
node ./node_modules/istanbul/lib/cli.js report --dir ./report
open report/lcov-report/index.html

The resultant report is broken:

screen shot 2016-03-19 at 4 59 49 pm

I've tried a number of things:

This additional processing step is important because I'm trying to combine server and client results - not just for an overall number, but also for a combined HTML report. And the babel processing seems to be making it difficult. I'm also looking into updating karma-coverage to output something that istanbul report can understand; sad that they are not immediately compatible!

Gafoor786 commented 6 years ago

I am getting the below error. please anyone help me on this

_mocha:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")

SyntaxError: missing ) after argument list at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:607:28) at Module.replacementCompile (V:\Users\mgafoozj\Downloads\sample-mocha-compilers-master\sample-mocha-compilers-master\node_modules\append-transform\index.js:58:13) at Module._extensions..js (module.js:654:10) at Object. (V:\Users\mgafoozj\Downloads\sample-mocha-compilers-master\sample-mocha-compilers-master\node_modules\append-transform\index.js:62:4) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3) at Function.Module.runMain (module.js:684:10) npm ERR! Test failed. See above for more details.