karma-coverage icon indicating copy to clipboard operation
karma-coverage copied to clipboard

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

Open martinmicunda opened this issue 9 years ago • 17 comments

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

martinmicunda avatar Aug 17 '15 21:08 martinmicunda

@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.

onlywei avatar Sep 15 '15 15:09 onlywei

@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 avatar Sep 15 '15 15:09 martinmicunda

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

martinmicunda avatar Oct 01 '15 17:10 martinmicunda

+1

pewh avatar Oct 21 '15 09:10 pewh

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

jashatton avatar Oct 28 '15 14:10 jashatton

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

martinmicunda avatar Oct 28 '15 14:10 martinmicunda

@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?

jashatton avatar Oct 28 '15 14:10 jashatton

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

martinmicunda avatar Oct 28 '15 14:10 martinmicunda

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.

jashatton avatar Oct 28 '15 17:10 jashatton

@jashatton what modules did you switch to branches?

jsg2021 avatar Nov 18 '15 07:11 jsg2021

Is there an update here?

onlywei avatar Dec 16 '15 18:12 onlywei

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.

jashatton avatar Dec 18 '15 21:12 jashatton

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

RomanHotsiy avatar Dec 19 '15 18:12 RomanHotsiy

@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

RomanHotsiy avatar Dec 22 '15 21:12 RomanHotsiy

@RomanGotsiy Thanks!

blittle avatar Dec 22 '15 21:12 blittle

+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?

AdamWillden avatar Dec 29 '15 14:12 AdamWillden

+1

otroboe avatar Aug 31 '16 18:08 otroboe