@@ -186,10 +186,12 @@ test.describe('from coverage data downloaded directly from the browser as JSON',
186186 1 , 1 , 1 , 1 ,
187187 // comment + p {}
188188 0 , 0 , 0 , 0 ,
189+ // newline
190+ 1 ,
189191 // @media
190192 1 ,
191193 // h1 {
192- 1 , 0 ,
194+ 0 ,
193195 // color: green; }
194196 1 , 1 , 1 ,
195197 ] ) ,
@@ -200,10 +202,10 @@ test.describe('from coverage data downloaded directly from the browser as JSON',
200202 let result = calculate_coverage ( coverage , html_parser )
201203 expect ( result . coverage_per_stylesheet . at ( 0 ) ?. chunks ) . toEqual ( [
202204 { start_line : 1 , is_covered : true , end_line : 4 , total_lines : 4 } ,
203- { start_line : 4 , is_covered : false , end_line : 8 , total_lines : 5 } ,
204- { start_line : 8 , is_covered : true , end_line : 10 , total_lines : 3 } ,
205- { start_line : 10 , is_covered : false , end_line : 11 , total_lines : 2 } ,
206- { start_line : 11 , is_covered : true , end_line : 14 , total_lines : 4 } ,
205+ { start_line : 5 , is_covered : false , end_line : 8 , total_lines : 4 } ,
206+ { start_line : 9 , is_covered : true , end_line : 10 , total_lines : 2 } ,
207+ { start_line : 11 , is_covered : false , end_line : 11 , total_lines : 1 } ,
208+ { start_line : 12 , is_covered : true , end_line : 14 , total_lines : 3 } ,
207209 ] )
208210 } )
209211
@@ -223,6 +225,7 @@ test.describe('from coverage data downloaded directly from the browser as JSON',
223225 ] ,
224226 html_parser ,
225227 )
228+ expect ( result . coverage_per_stylesheet . at ( 0 ) ?. text ) . toEqual ( 'h1 {\n\tcolor: blue;\n}' )
226229 expect ( result . coverage_per_stylesheet . at ( 0 ) ?. chunks ) . toEqual ( [
227230 {
228231 start_line : 1 ,
0 commit comments