[Pkg-javascript-commits] [node-tap-mocha-reporter] 33/137: don't overwrite stats.duration if already set

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.

commit e04d1201a7964bffc925c79360d5abb5572eeaea
Author: isaacs <i at izs.me>
Date:   Sun Apr 26 20:20:40 2015 -0400

    don't overwrite stats.duration if already set
---
 lib/reporters/base.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index 0a140ae..3fd4976 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -270,7 +270,8 @@ function Base(runner) {
 
   runner.on('end', function(){
     stats.end = new Date;
-    stats.duration = new Date - stats.start;
+    if (!stats.duration)
+      stats.duration = stats.end - stats.start;
   });
 
   runner.on('pending', function(){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git



More information about the Pkg-javascript-commits mailing list