Open Tin-Nguyen opened 9 years ago
Could you either post a link to the code or supply a minimal example reproducing this please?
Hi @Dignifiedquire ,
I think I've provided all things on my post. Because the Unit Test still works well, and the report has been created/updated successfully. However, we got the error in end of progress.
And I just get the issue when I add babelify
transform into the config. Have you checked with babelify
yet?
Please let me know if you need to get what information from my case. I will investigate deeper on this issue today.
Regards, Tin Nguyen
Hi @Dignifiedquire , is there any updates on this? the issue still be my tests :((
Sorry I haven't gotten to it yet, will try to take a look later today
+1
Hi @Dignifiedquire ,
I removed babelify
, the report works fine. I really don't know the root cause. Could you help to check?
I switched to cheap-module-source-map
and the issue is gone. Seems like incorrect sourcemap causes the failure while branch annotation.
This appears to be an issue with Istanbul and source maps. See https://github.com/karma-runner/karma-coverage/issues/157#issuecomment-129636012.
Yes this seems to be the same issue as #157
We had this error and I spent yesterday morning fixing. Here's a write-up of what worked for us.
I'm facing 1 issue on my Unit Test. It happens when I tried to add
babelify
intobrowerify
's transform to convert ES6 in my implement code.I'm using:
0.3.17
0.4.2
6.1.2
Chrome 43.0.2357 (Mac OS X 10.10.2): Executed 313 of 324 (skipped 11) SUCCESS (0.515 secs / 0.313 secs)
ERROR [coverage]: [TypeError: Cannot read property 'text' of undefined] TypeError: Cannot read property 'text' of undefined at/node_modules/istanbul/lib/report/html.js:283:53
at Array.forEach (native)
at annotateBranches (/node_modules/istanbul/lib/report/html.js:250:30)
at HtmlReport.Report.mix.writeDetailPage (/node_modules/istanbul/lib/report/html.js:421:9)
at /node_modules/istanbul/lib/report/html.js:484:26
at SyncFileWriter.extend.writeFile (/node_modules/istanbul/lib/util/file-writer.js:57:9)
at FileWriter.extend.writeFile (/node_modules/istanbul/lib/util/file-writer.js:147:23)
at /node_modules/istanbul/lib/report/html.js:483:24
at Array.forEach (native)
at HtmlReport.Report.mix.writeFiles (/node_modules/istanbul/lib/report/html.js:477:23)