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.

TypeError when trying to display coverage report

See original GitHub issue

Hey 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ryanlukercommented, Jul 29, 2018

@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.

1reaction
ryanlukercommented, Jul 4, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

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