15
15
< div class ="header low ">
16
16
< h1 > Code coverage report for < span class ="entity "> src/ng-reading-indicator.js</ span > </ h1 >
17
17
< h2 >
18
- Statements: < span class ="metric "> 35.87 % < small > (33 / 92 )</ small > </ span >
19
- Branches: < span class ="metric "> 22.68 % < small > (22 / 97 )</ small > </ span >
18
+ Statements: < span class ="metric "> 35.11 % < small > (33 / 94 )</ small > </ span >
19
+ Branches: < span class ="metric "> 25.29 % < small > (22 / 87 )</ small > </ span >
20
20
Functions: < span class ="metric "> 50% < small > (8 / 16)</ small > </ span >
21
- Lines: < span class ="metric "> 35.87 % < small > (33 / 92 )</ small > </ span >
21
+ Lines: < span class ="metric "> 35.11 % < small > (33 / 94 )</ small > </ span >
22
22
Ignored: < span class ="metric "> < span class ="ignore-none "> none</ span > </ span >
23
23
</ h2 >
24
24
< div class ="path "> < a href ="../index.html "> All files</ a > » < a href ="index.html "> src/</ a > » ng-reading-indicator.js</ div >
@@ -225,7 +225,11 @@ <h2>
225
225
198
226
226
199
227
227
200
228
- 201</ td > < td class ="line-coverage "> < span class ="cline-any cline-yes "> 1</ span >
228
+ 201
229
+ 202
230
+ 203
231
+ 204
232
+ 205</ td > < td class ="line-coverage "> < span class ="cline-any cline-yes "> 1</ span >
229
233
< span class ="cline-any cline-neutral "> </ span >
230
234
< span class ="cline-any cline-neutral "> </ span >
231
235
< span class ="cline-any cline-yes "> 1</ span >
367
371
< span class ="cline-any cline-neutral "> </ span >
368
372
< span class ="cline-any cline-neutral "> </ span >
369
373
< span class ="cline-any cline-no "> </ span >
374
+ < span class ="cline-any cline-neutral "> </ span >
375
+ < span class ="cline-any cline-no "> </ span >
376
+ < span class ="cline-any cline-neutral "> </ span >
370
377
< span class ="cline-any cline-no "> </ span >
371
378
< span class ="cline-any cline-no "> </ span >
372
379
< span class ="cline-any cline-no "> </ span >
398
405
< span class ="cline-any cline-no "> </ span >
399
406
< span class ="cline-any cline-no "> </ span >
400
407
< span class ="cline-any cline-no "> </ span >
408
+ < span class ="cline-any cline-no "> </ span >
401
409
< span class ="cline-any cline-neutral "> </ span >
402
410
< span class ="cline-any cline-no "> </ span >
403
411
< span class ="cline-any cline-neutral "> </ span >
545
553
< span class ="cstat-no " title ="statement not covered " > bottom = findEdges(article[0]).bottom;</ span >
546
554
< span class ="cstat-no " title ="statement not covered " > top = findEdges(article[0]).top;</ span >
547
555
< span class ="cstat-no " title ="statement not covered " > height = findEdges(article[0]).height;</ span >
548
- < span class ="cstat-no " title ="statement not covered " > expandOffset = (expandOnHeadline) ? findEdges(article.find('h1')[0]) : {top: 50 };</ span >
556
+ < span class ="cstat-no " title ="statement not covered " > expandOffset = (expandOnHeadline) ? findEdges(article.find('h1')[0]) : {top: 0 };</ span >
549
557
< span class ="cstat-no " title ="statement not covered " > updateProgress();</ span >
550
558
}
551
559
567
575
}
568
576
569
577
< span class ="cstat-no " title ="statement not covered " > progressBar.style.width = progress + '%';</ span >
578
+
579
+ < span class ="cstat-no " title ="statement not covered " > console.log(options, expandOffset.top, options.topOffset);</ span >
580
+
570
581
< span class ="cstat-no " title ="statement not covered " > if ((!options.expand && options.type === 'small' && scrollPos >= (top + expandOffset.top + options.topOffset)) || (options.expand && scrollPos > top && scrollPos < (top + expandOffset.top + options.topOffset))) {</ span >
571
582
< span class ="cstat-no " title ="statement not covered " > angular.element(element)[0].style.height = '5px';</ span >
572
583
< span class ="cstat-no " title ="statement not covered " > angular.element(element).addClass('ng-reading-indicator-shrink');</ span >
@@ -583,20 +594,21 @@ <h2>
583
594
}
584
595
585
596
< span class ="fstat-no " title ="function not covered " > function calculateReadingTime(){</ span >
586
- < span class ="cstat-no " title ="statement not covered " > var wordCount = article.text().split(' ').length;</ span >
597
+ < span class ="cstat-no " title ="statement not covered " > var wordCount = angular.element( article[0]) .text().trim ().split(' ').length;</ span >
587
598
< span class ="cstat-no " title ="statement not covered " > var minutes = Math.floor(wordCount / options.readingTime.speed);</ span >
588
599
< span class ="cstat-no " title ="statement not covered " > var seconds = Math.floor(wordCount % options.readingTime.speed / (options.readingTime.speed / 60));</ span >
589
600
< span class ="cstat-no " title ="statement not covered " > var estimate = options.readingTime.prefix;</ span >
590
601
591
- < span class ="cstat-no " title ="statement not covered " > if (!options.readingTime.seconds && seconds >= 30) {</ span >
602
+ < span class ="cstat-no " title ="statement not covered " > if (seconds >= 30) {</ span >
592
603
< span class ="cstat-no " title ="statement not covered " > minutes++;</ span >
593
604
}
594
605
595
- < span class ="cstat-no " title ="statement not covered " > if (Math.floor((minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100))) > 0 || !options.readingTime.seconds) {</ span >
596
- < span class ="cstat-no " title ="statement not covered " > estimate += Math.floor((minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100)));</ span >
606
+ < span class ="cstat-no " title ="statement not covered " > if (Math.floor(minutes * (1 - (progress/100))) > 0 || !options.readingTime.seconds) {</ span >
607
+ < span class ="cstat-no " title ="statement not covered " > minutes = minutes * (1 - (progress/100));</ span >
608
+ < span class ="cstat-no " title ="statement not covered " > estimate += Math.floor(minutes);</ span >
597
609
< span class ="cstat-no " title ="statement not covered " > estimate += options.readingTime.minutesSuffix;</ span >
598
- } else < span class ="cstat-no " title ="statement not covered " > if (Math.floor(( minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100))) === 0 && options.readingTime.seconds) {</ span >
599
- < span class ="cstat-no " title ="statement not covered " > estimate += Math.round((((minutes <= 9 ? minutes + '0' : minutes )*60) * (1 - (progress/100))) / 10) * options.readingTime.secondInterval;</ span >
610
+ } else < span class ="cstat-no " title ="statement not covered " > if (Math.floor(minutes * (1 - (progress/100))) === 0 && options.readingTime.seconds) {</ span >
611
+ < span class ="cstat-no " title ="statement not covered " > estimate += Math.round((((minutes)*60) * (1 - (progress/100))) / 10) * options.readingTime.secondInterval;</ span >
600
612
< span class ="cstat-no " title ="statement not covered " > estimate += options.readingTime.secondsSuffix;</ span >
601
613
} else {
602
614
< span class ="cstat-no " title ="statement not covered " > estimate += 0 + options.readingTime.secondsSuffix;</ span >
630
642
631
643
</ div >
632
644
< div class ="footer ">
633
- < div class ="meta "> Generated by < a href ="http://istanbul-js.org/ " target ="_blank "> istanbul</ a > at Wed Jul 15 2015 11:23:45 GMT+0200 (CEST)</ div >
645
+ < div class ="meta "> Generated by < a href ="http://istanbul-js.org/ " target ="_blank "> istanbul</ a > at Thu Jul 16 2015 10:01:41 GMT+0200 (CEST)</ div >
634
646
</ div >
635
647
< script src ="../prettify.js "> </ script >
636
648
< script >
0 commit comments