File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,18 +193,21 @@ class TestCoverage {
193193 ObjectAssign ( range , mapRangeToLines ( range , lines ) ) ;
194194
195195 if ( isBlockCoverage ) {
196- ArrayPrototypePush ( branchReports , {
197- __proto__ : null ,
198- line : range . lines [ 0 ] ?. line ,
199- count : range . count ,
200- } ) ;
201-
202- if ( range . count !== 0 ||
203- range . ignoredLines === range . lines . length ) {
204- branchesCovered ++ ;
196+ // Only include branches that are not entirely on ignored lines
197+ if ( range . ignoredLines !== range . lines . length ) {
198+ ArrayPrototypePush ( branchReports , {
199+ __proto__ : null ,
200+ line : range . lines [ 0 ] ?. line ,
201+ count : range . count ,
202+ } ) ;
203+
204+ if ( range . count !== 0 ||
205+ range . ignoredLines === range . lines . length ) {
206+ branchesCovered ++ ;
207+ }
208+
209+ totalBranches ++ ;
205210 }
206-
207- totalBranches ++ ;
208211 }
209212 }
210213
You can’t perform that action at this time.
0 commit comments