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
Incorrect branch coverage when using implicit else post #633 #670
Comments
This was hopefully fixed by: Are you able to test against the latest release of the instrumenter? |
@bcoe, I am using the latest version and the issue is still persists. |
1 similar comment
@bcoe, I am using the latest version and the issue is still persists. |
Using lastest version and not working @bcoe |
@bcoe @alan-agius4 @phyr0s @luismartinez85 Ok so I originally fixed the coverage map in #633 because of the erroneous output. Now based on the help I've been getting from @bcoe on publishing #673 and #675 I think we're both busy. I'm certainly not fixing this for a more than two months so I'd consider picking up the genius quill and fix this case in the downstream reporting too. Now I do notice one thing: Around January, my expectation was the output from the API to be this:
It seems that the placeholder that I assumed would be left there in order to account for the implicit else was most likely giggle implicitly removed. So that's probably the adjustment or misalignment that is the source of this issue. Cheerio, fellow collaborators ;) |
@adrian-burlacu-software hello. I tried lastest version but branch coverage is broken. |
@phyr0s |
@bcoe @alan-agius4 @phyr0s @luismartinez85 @djok1 Just now I added the necessary placeholder to fix this in the reporting in pull #679. When this gets released, I'll watch, but two things need to happen:
|
@bcoe when you can check the @adrian-burlacu-software job? Thanks |
@bcoe |
This is hopefully fixed by #679 |
I can confirm that it is not fixed, after upgrading to Angular 14 and reproducing the same as the initial bug report (angular/angular-cli#22652), coverage is still incorrectly computed. |
After some investigation, it seems that:
It seems that either the branch coverage gets modified between the instrumentation and the reporter, or that the reporter does not use info from the instrumentation? I'm not familiar with the structure of this project, in case some guidance can be provided, I'd be happy to investigate further. Currently, I don't know where to look for the actual problem. |
@antch + @acieroid, the |
Post #633 the implicit else is not being counted as a branch.
Before
After
Reproduction
https://github.com/alan-agius4/coverage-issue-istanbul
Reported in Angular CLI: angular/angular-cli#22652
The text was updated successfully, but these errors were encountered: