Skip to content

Commit

Permalink
Merge pull request #2299 from AviVahl/master
Browse files Browse the repository at this point in the history
Fix % always 0 in HTML reporter
  • Loading branch information
boneskull committed Jun 26, 2016
2 parents 2293106 + 85ffb51 commit 0fe8133
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reporters/html.js
Expand Up @@ -125,6 +125,7 @@ function HTML(runner) {

runner.on('suite end', function(suite) {
if (suite.root) {
updateStats();
return;
}
stack.shift();
Expand Down Expand Up @@ -195,7 +196,7 @@ function HTML(runner) {

function updateStats() {
// TODO: add to stats
var percent = stats.tests / this.total * 100 | 0;
var percent = stats.tests / runner.total * 100 | 0;
if (progress) {
progress.update(percent).draw(ctx);
}
Expand Down

0 comments on commit 0fe8133

Please sign in to comment.