TypeError when trying to display coverage report
See original GitHub issueHey there
I’m running into an issue when trying to use version 2 of this extension with VSCode 1.24 and a coverage report from a PHP project.
I used PHPUnit to create a coverage report in XML (Clover) and set coverage-gutters.xmlname
accordingly in the settings.
When I now want to display the coverage, I get the following output:
[1530257529661][coverageservice]: INITIALIZING
[1530259016664][coverageservice]: LOADING
[1530259017522][coverageservice]: Loading 1 file(s)
[1530259017552][coverageservice]: Warning TypeError: Cannot read property 'forEach' of undefined
[1530259017552][coverageservice]: RENDERING
[1530259017552][coverageservice]: READY
Happy to provide access to a sample repo / XML file if needed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Angular testing - Error generating coverage report
I'm trying to get a coverage report from ng test --code-coverage . ... ERROR [karma]: TypeError: Cannot read property 'replace' of undefined ......
Read more >Release 7.0.0b1 unknown - Coverage.py
Coverage.py can annotate your source code to show which lines were executed and which were not. The html command creates an HTML report...
Read more >Configuring Jest
Indicates whether the coverage information should be collected while executing the test. Because this retrofits all executed files with coverage ...
Read more >Code coverage report for dist/qunit.js - Trey Hunner
setTimeout !== undefined, sessionStorage: (function() { var x = "qunit-test-string"; try { sessionStorage.setItem( x, x ); sessionStorage.
Read more >Troubleshooting Code Coverage - Visual Studio (Windows)
However, in some cases, the Code Coverage Results window displays an ... tests are executed, there's nothing for code coverage to report.
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
@swissspidy #141 finally got the php side working, thanks for doing the research and the if else block! It ended up working perfectly https://github.com/ryanluker/vscode-coverage-gutters/pull/141/commits/50ea4fea491d9b69a8ee46143b6df1ab80d5ceb3#diff-3661d843d67f46cb9cfd476ad7e1920cR26 . I will release 2.1.0 this afternoon (pst) to the marketplace and will publish a release to github soon.
@swissspidy yes that approach sounds like it should work, I will take a first stab at implementing something this weekend in the branch I mentioned earlier. @pedroresende thanks for the extra info around phpunit xml option being junit, I think having the clover option should be enough for most php developers.