From 785f4632c7b038e1b87c969ce9933871e2fa83d8 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Mon, 27 Apr 2015 02:06:46 +0200 Subject: [PATCH] Update test runner code. --- test/util/mocha.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/util/mocha.js b/test/util/mocha.js index 17169e3a..c9f8da92 100644 --- a/test/util/mocha.js +++ b/test/util/mocha.js @@ -66,12 +66,14 @@ function onTest() { /*jshint validthis: true */ var runner = this; - var percent = 100.0 - 100.0 * runner.stats.tests / runner.total; + var percent = 100.0 * runner.stats.tests / runner.total; + var stats = ((new Date().getTime() - runner.stats.start) / 1000.0).toFixed(3) + 's'; if (runner.stats.failures) { $('#report').addClass('fail'); } - $('#report .progress').css('width', percent + '%'); + $('#report .progress').css('width', (100 - percent) + '%'); + $('#report .stats').text(stats); } function setupMocha() {