Open inancgumus opened 8 years ago
Because of the sourcemap? At this point Riot doesn't provide its sourcemap.
@cognitom How can we add sourcemap support to Riot?
Isn't the whole discussion a waste of time? I mean if you want to get the coverage on the riot tags just export them using the compiler and run karma using the js output riot **/*.tag my-tags.js
We will at some point implement sourcemaps, but since there is a compiler exporting the riot tags to pure javascript, sourcemaps are just a "nice to have" feature not a "must".
@GianlucaGuarini Simplicity and minimalism is one of the tenets of Riot as compared to React as I understand. So, adding turnaround solutions to make it work for to get a coverage report isn't making Riot simple, in constrast, making it hard to work with for/in proper testing environments which is a minimum needed stuff for every developer. I vote on it's a "must" not "nice to have". Thanks for the turnaround solution by the way.
By the way, actually, what I really wonder is why html coverage output is true while lcov coverage output is not?
Probably we need just to update karma-riot
to let it recognize the riot compiler output as part of the coverage code. I will check it asap
Can't generate valid coverage reports from compiled tag files. For example: With karma lcov reporting, compiled tag file's coverage is not correctly reported.
Reproduce:
Example project:
git clone https://github.com/vitogit/tdd-mocha-chai-riot
Karma Config (updated):
How to run?
You can also see html based coverage reports inside coverage directory's html coverage reports.
LCOV is incorrect:
HTML is correct: