ember-cli-code-coverage
ember-cli-code-coverage copied to clipboard
Global error: Uncaught TypeError: Cannot read property 'pct'
getting this error when i ran 'COVERAGE=true ember test' have some screen shots stating the same
1.console error
2: VScode terminal error
3: debugged view
the issue is because of stringification of the data object as in (debugged view screenshot) can u please look into it
ember-cli: 3.22.0 node: 10.16.3 ember-cli-code-coverage : 1.0.2 os: darwin x64
will be happy to help if needed
@vignesh20794 would you mind creating a repo to reproduce this issue? That would be very helpful to debug.
I run into the same issue on this Repo: https://github.com/opensource-challenge/opensource-challenge-client/tree/dependency-updates (branch dependency-updates
) somehow the xhr.response
is a string which would need to be parsed before accessing...
I debugged this with someone earlier today, and in our case the issue was that some tests were not properly resetting the pretender instance so window.XMLHttpRequest
was the FakeRequest
object that Pretender installs, which does not respect the responseType
property.
Specifically, someone was calling this.server = setupMirage()
in their test, but never this.server.shutdown()
.
😭 That explains so very much