istanbuljs/nyc

Coverage fails when run with OxProject

Open

#1,035 建立於 2019年3月19日

在 GitHub 查看
 (11 留言) (3 反應) (0 負責人)JavaScript (392 fork)batch import
dochelp wantedpinned

倉庫指標

Star
 (5,468 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hello everybody, When generating an html coverage report with nyc report --reporter=html I am getting the html files in a folder, but trying to open a specific file, the following error is occured:

Cannot read property 'start' of undefined
TypeError: Cannot read property 'start' of undefined
    at /Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:92:34
    at Array.forEach ()
    at annotateFunctions (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:88:26)
    at Object.annotateSourceCode (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:239:9)
    at HtmlReport.onDetail (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-reports/lib/html/index.js:269:23)
    at Visitor.(anonymous function) [as onDetail] (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:34:30)
    at ReportNode.Node.visit (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:121:17)
    at /Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:114:23
    at Array.forEach ()
    at visitChildren (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:113:32)
    at ReportNode.Node.visit (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:124:5)
    at Tree.visit (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:155:20)
    at reporter.forEach (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/index.js:454:10)
    at Array.forEach ()
    at NYC.report (/Users/ognyanchikov/Etherlime/etherlime/node_modules/nyc/index.js:453:17)
    at showCoverageResults (/Users/ognyanchikov/Etherlime/etherlime/cli-commands/etherlime-test/etherlime-coverage.js:206:13)
    at Timeout.setTimeout (/Users/ognyanchikov/Etherlime/etherlime/cli-commands/etherlime-test/etherlime-coverage.js:73:9)
    at ontimeout (timers.js:482:11)
    at tryOnTimeout (timers.js:317:5)
    at Timer.listOnTimeout (timers.js:277:5

The text table report works and shows results, but the HTML is broken.

貢獻者指南