karma-runner / karma-coverage

A Karma plugin. Generate code coverage.
MIT License
770 stars 247 forks source link

isparta instrumenter is not working with karma-coverage v0.5.0 #175

Open martinmicunda opened 9 years ago

martinmicunda commented 9 years ago

I try get run isparta instrumenter with karma-coverage v0.5.0 but coverage code is still ES5 and not ES6 and my understanding is that we should not use karma-coverage fork from @douglasduteil as it mentioned in this comment by @Dignifiedquire. Has anybody try isparta with karma-coverage v0.5.0? Thanks

onlywei commented 9 years ago

@martinmicunda I think you mean v0.5.0. I also just tried with v0.5.2 and I am still seeing ES5 and not ES6 code.

martinmicunda commented 9 years ago

@onlywei yeah I meant v0.5.0 and even I am running the latest v0.5.2 but the code is still ES5 and not ES6... maybe @Dignifiedquire and @douglasduteil could help here?

martinmicunda commented 9 years ago

@Dignifiedquire @douglasduteil is there any update on this issue? Thanks

pewh commented 9 years ago

+1

jashatton commented 9 years ago

@Dignifiedquire @douglasduteil @martinmicunda I was hoping to get this working as well, any chance of another temporary fork, or a known workaround? Thanks

martinmicunda commented 9 years ago

@jashatton I wrote a blog how to get run unit test with coverage.. Check it here

jashatton commented 9 years ago

@martinmicunda It is a great article, thank you for writing it. It mirrors our set up and what brought me to this issue. Did you ever get ES6 code to display in the coverage reports?

martinmicunda commented 9 years ago

@jashatton yeah it mentioned in the article.. You can see ES6 coverage report here

jashatton commented 9 years ago

Well, after a couple hours of reading and inferring into documentation and Stack Overflow anwsers, I figured out how to get branch versions of npm modules installed. But, I have it working now. Thanks again for the article it was the catalyst for me to learn more about npm and have readable coverage reports.

jsg2021 commented 8 years ago

@jashatton what modules did you switch to branches?

onlywei commented 8 years ago

Is there an update here?

jashatton commented 8 years ago

Wow, sorry I missed the notifications. I am currently using what is below in my package.json

devDependencies {
    "babel-core": "5.8.21",
    "gulp": "3.9.0",
    "gulp-jshint": "1.11.2",
    "gulp-sass": "2.0.2",
    "isparta": "3.5.0",
    "istanbul": "git+http://github.com/gotwarlost/istanbul/#source-map",
    "jasmine-core": "2.3.4",
    "jshint-stylish": "2.0.1",
    "jspm": "0.15.7",
    "karma": "0.13.9",
    "karma-babel-preprocessor": "5.2.2",
    "karma-chrome-launcher": "0.2.0",
    "karma-coverage": "git+https://github.com/douglasduteil/karma-coverage.git#next",
    "karma-jasmine": "0.3.6",
    "karma-jspm": "2.0.1-beta.1",
    "karma-junit-reporter": "0.3.8",
    "karma-ng-html2js-preprocessor": "0.2.0",
    "karma-phantomjs-launcher": "0.2.1",
    "karma-sourcemap-loader": "0.3.6",
    "phantomjs": "1.9.18",
    "shelljs": "0.5.1",
    "vinyl-source-stream": "1.1.0"
}

@jsg2021 I am referencing Github npm modules for karma-coverage and istanbul to get coverage reports that have usable sourcemaps.

If anyone could use more information certainly let me know, I will try to keep an eye out for notifications.

RomanHotsiy commented 8 years ago

Still don't work on v0.5.3 But works great with @douglasduteil's fork

RomanHotsiy commented 8 years ago

@blittle $ npm install github:douglasduteil/karma-coverage#next --save-dev does the trick.

You can check my package.json and karma.conf.js

And this is an example of my coverage results. You can see it shows ES6 code

blittle commented 8 years ago

@RomanGotsiy Thanks!

AdamWillden commented 8 years ago

+1

Be great if this could be fixed. Seems that the douglasteil branch cant use the coverage check option so either way I have to lose some functionality that I want :-(

I'm assuming this is a problem with karma-coverage and not isparta?

otroboe commented 8 years ago

+1