question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Coverage fails when run with OxProject

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
LunaPgcommented, May 8, 2019

Do you guys have update on this issue ?

2reactions
coreyfarrellcommented, Nov 26, 2019

@jaapz you are experiencing a different issue. Run npm i -D nyc@next to upgrade to the pre-release version which fixes this issue with all. If you need further assistance please open a new ticket with all required information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Most tests run with coverage fail : IDEA-295404 - YouTrack
Most test fail when running with coverage enabled. The issue was encountered after updating to the 2022.2 EAP 3 of IntelliJ IDEA Ultimate....
Read more >
The peculiar case of passing tests and failing coverage
The project's coverage runs after the tests and uses nyc which runs mocha. So how could the tests that have just run successfully...
Read more >
Java Test with coverage fails on methods that use Scanner ...
However in my actual project, both tests fail when run as coverage (maybe because the test tests other methods that use Scanner before...
Read more >
Troubleshooting Code Coverage - Visual Studio (Windows)
Code coverage is not run, and either the code coverage window doesn't open at the end of the test run, or it shows...
Read more >
Code coverage analysis fails to find any code to analyse in ...
NET Core 3.1 xUnit test project containing unit tests. When running code coverage analysis on this solution the Code Coverage Results pane shows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found