Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k
stars
787
forks
source link
Fix js exception and broken link in report html #741
JS Exception fix - happened when I am running istanbul report --include "coverage/**/*.json" on coverage.json report that I got from protractor-istanbul-plugin
/usr/local/lib/node_modules/istanbul/lib/report/html.js:239
endCol = structuredText[startLine].text.originalLength();
^
TypeError: Cannot read property 'text' of undefined
at /usr/local/lib/node_modules/istanbul/lib/report/html.js:239:51
at Array.forEach (native)
at annotateFunctions (/usr/local/lib/node_modules/istanbul/lib/report/html.js:224:26)
at HtmlReport.writeDetailPage (/usr/local/lib/node_modules/istanbul/lib/report/html.js:427:9)
at /usr/local/lib/node_modules/istanbul/lib/report/html.js:489:26
at AsyncFileWriter.processFile (/usr/local/lib/node_modules/istanbul/lib/util/file-writer.js:93:9)
at /usr/local/lib/node_modules/istanbul/node_modules/async/lib/async.js:987:13
at Immediate.process (/usr/local/lib/node_modules/istanbul/node_modules/async/lib/async.js:953:21)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
In html report, in "File" cell link is broken if folder's/file's name has character that needs URI encoding
For example: src/app/+main/+dashboard/
Coverage remained the same at 97.523% when pulling 9a8f278ff40e5bcdf68a27bc1ec91ad07f50a8ca on treeskar:master into 89e338fcb1c8a7dea3b9e8f851aa55de2bc3abee on gotwarlost:master.
Coverage decreased (-0.9%) to 96.628% when pulling 9a8f278ff40e5bcdf68a27bc1ec91ad07f50a8ca on treeskar:master into 89e338fcb1c8a7dea3b9e8f851aa55de2bc3abee on gotwarlost:master.
JS Exception fix - happened when I am running
istanbul report --include "coverage/**/*.json"
on coverage.json report that I got from protractor-istanbul-pluginIn html report, in "File" cell link is broken if folder's/file's name has character that needs URI encoding For example: src/app/+main/+dashboard/