@@ -73,7 +73,8 @@ function HTML(runner, options) {
7373 var progressBar = items [ 0 ] . getElementsByTagName ( 'progress' ) [ 0 ] ;
7474 var progressRing = [
7575 items [ 0 ] . getElementsByClassName ( 'ring-flatlight' ) [ 0 ] ,
76- items [ 0 ] . getElementsByClassName ( 'ring-highlight' ) [ 0 ] ] ;
76+ items [ 0 ] . getElementsByClassName ( 'ring-highlight' ) [ 0 ]
77+ ] ;
7778 var progressRingRadius = null ; // computed CSS unavailable now, so set later
7879 var root = document . getElementById ( 'mocha' ) ;
7980
@@ -233,14 +234,20 @@ function HTML(runner, options) {
233234 ) ;
234235 }
235236 if ( progressRing ) {
236- var radius = parseFloat ( getComputedStyle ( progressRing [ 0 ] ) . getPropertyValue ( 'r' ) ) ;
237+ var radius = parseFloat (
238+ getComputedStyle ( progressRing [ 0 ] ) . getPropertyValue ( 'r' )
239+ ) ;
237240 var wholeArc = Math . PI * 2 * radius ;
238241 var highlightArc = percent * ( wholeArc / 100 ) ;
239242 // The progress ring is in 2 parts, the flatlight color and highlight color.
240243 // Rendering both on top of the other, seems to make a 3rd color on the edges.
241244 // To create 1 whole ring with 2 colors, both parts are inverse of the other.
242- progressRing [ 0 ] . style [ 'stroke-dasharray' ] = `0,${ highlightArc } px,${ wholeArc } px` ;
243- progressRing [ 1 ] . style [ 'stroke-dasharray' ] = `${ highlightArc } px,${ wholeArc } px` ;
245+ progressRing [ 0 ] . style [
246+ 'stroke-dasharray'
247+ ] = `0,${ highlightArc } px,${ wholeArc } px` ;
248+ progressRing [ 1 ] . style [
249+ 'stroke-dasharray'
250+ ] = `${ highlightArc } px,${ wholeArc } px` ;
244251 }
245252
246253 // update stats
0 commit comments