-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong behavior with CLI option coverageProvider v8 and broken cobertura report #9561
Comments
UPD. I also tried to remove coverage options from config files, and only provide them via cli. So it seems that CLI option |
Yeah, only the CLI option works, for some reason the config one doesn't. I'll fix that. As for the broken report, that probably the same as the c8 issue you linked to, yeah |
It's great that it will be fixed! UPD. Aded an issue istanbuljs/istanbuljs#527 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
In my jest config file, I have
and all seems fine. But if I add CLI flag
--coverageProvider v8
then I get completely another coverage file with<method name="map.<computed>.f" hits="1" signature="()V">
in there - and cobertura can't parse it because<
is not allowed in method name.It only happens on node 12 and 13.
To Reproduce
Steps to reproduce the behavior:
I added a sample repo https://github.com/jehy/jest-coverage-bug
There are two scripts
Those should make same output, but
good-coverage
is fine, andbad-coverage
provides completely different coverage file with invalid method name.See generated bad file here:
https://github.com/jehy/jest-coverage-bug/blob/master/coverage-bad/cobertura-coverage.xml
And good file here:
https://github.com/jehy/jest-coverage-bug/blob/master/coverage-good/cobertura-coverage.xml
Possibly related issue: bcoe/c8#149
Expected behavior
I expect that coverage files would be same and that cobertura will be able to read it (it won't contain
<
in method name).Link to repl or repo (highly encouraged)
I described reproduction and link to repo in
Reproduce section
.envinfo
The text was updated successfully, but these errors were encountered: