You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Jest reports wrong branch coverage percentage. Uncovered lines are correct.
To Reproduce
EDIT
console.log(1/2)
so that branches are not empty. Still wrong/unexpected resultstests with only 1 function call
foo(0,0) gives 50%
foo(0,1) gives 50%
foo(1,0) gives 75%
foo(1,1) gives 75%
Uncovered lines are always correct and if both branches are covered it gives 100%.
Expected behavior
There is only 1 'if-else', so branch coverage should always be a multiple of 0.5.
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: