istanbuljs-archived-repos / istanbul-reports

deprecated, instead use https://github.com/istanbuljs/istanbuljs
Other
14 stars 11 forks source link

fix "Cannot read property text of undefined" #10

Closed levity closed 8 years ago

levity commented 8 years ago

This is similar to https://github.com/istanbuljs/istanbul-reports/pull/9 but it's a bit cleaner and addresses one more place where the error can occur.

yahoocla commented 8 years ago

CLA is valid!

MinweiShen commented 8 years ago

Solves my problem!

dennybiasiolli commented 8 years ago

Works for me too

bcoe commented 8 years ago

@levity sorry for the slow turnaround on this, mind rebasing and I'll get it shipped ASAP?

bcoe commented 7 years ago

@levity @dennybiasiolli @MinweiShen this will be shipped in the next release of nyc, I would love the extra help testing (as there are a few big features going out in this release as well).

npm cache clear; npm i nyc@next

satyendra-singh commented 7 years ago

nothing is wrong with node module. I also had same problem and googled all the day to figure this out... finally I found special characters in my code -- it was <U+2028> that was causing problem istanbul go through entire code for coverage. I removed all special character and ran test cases again. every thing works fine.

bcoe commented 7 years ago

@satyendra-singh this is an interesting bug! if it's reproducable, perhaps you could open a separate ticket and we can dig into it?

glazar commented 7 years ago

@levity We should also port these changes to https://github.com/gotwarlost/istanbul/blob/master/lib/report/html.js. I ran into a similar issue with a setup involving the above mentioned file, and the fix is not yet to be found there. I can create a PR for that one.