[Pkg-javascript-commits] [node-tap-mocha-reporter] 45/137: classic: highlight slow suites

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:25 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 101a7d5b45fc81e08f274cf1947a03718f081d85
Author: isaacs <i at izs.me>
Date:   Wed Apr 29 18:20:55 2015 -0400

    classic: highlight slow suites
---
 lib/reporters/classic.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/reporters/classic.js b/lib/reporters/classic.js
index a54ec5b..7fcebb0 100644
--- a/lib/reporters/classic.js
+++ b/lib/reporters/classic.js
@@ -6,6 +6,7 @@ var Base = require('./base')
   , yaml = require('js-yaml')
   , util = require('util')
   , fancy = Base.useColors
+  , ms = require('../ms.js')
 
 util.inherits(Classic, Base)
 
@@ -81,7 +82,11 @@ function Classic (runner) {
     else
       num = Base.color('pending', num)
 
-    console.log(title + dots + num)
+    var fmt = title + dots + num
+    if (suite.duration / total > 250)
+      fmt += Base.color('slow', ' ' + ms(Math.round(suite.duration)))
+
+    console.log(fmt)
 
     if (fails.length) {
       var failMsg = ''

-- 
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