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
functionsomeFunction(value: boolean){if(value){// ...}else{// ...}// istanbul ignore next (Not reachable. All possible values have been considered)invariant(false,'Unexpected value: '+inspect((value: empty)));}
And Istanbul happily ignores invariant because we provide comment but at the same reports that we have uncovered branch.
Ideally, we would contribute a fix to Istanbul that makes it ignore uncovered branches if the only code that is reachable in this branch is uncovered.
Alternatively, we can write a script that removes those branches from coverage/tests/coverage_final.json using @babel/parser to parser source files.
The text was updated successfully, but these errors were encountered:
In a few dozen places we have code like this:
And Istanbul happily ignores
invariant
because we provide comment but at the same reports that we have uncovered branch.Ideally, we would contribute a fix to Istanbul that makes it ignore uncovered branches if the only code that is reachable in this branch is uncovered.
Alternatively, we can write a script that removes those branches from
coverage/tests/coverage_final.json
using@babel/parser
to parser source files.The text was updated successfully, but these errors were encountered: