Coverage fails when run with OxProject
See original GitHub issueHello 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:
- Created 5 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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