[Pkg-javascript-commits] [node-tap-mocha-reporter] 42/137: dump: More useful debugging info
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 79ba7793aaf8c7c3f1432382303bfc80c32f2bad
Author: isaacs <i at izs.me>
Date: Wed Apr 29 15:54:03 2015 -0400
dump: More useful debugging info
---
lib/reporters/dump.js | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/lib/reporters/dump.js b/lib/reporters/dump.js
index 1ea19cf..02aa50c 100644
--- a/lib/reporters/dump.js
+++ b/lib/reporters/dump.js
@@ -1,7 +1,9 @@
exports = module.exports = Dump
var Base = require('./base')
, cursor = Base.cursor
- , color = Base.color;
+ , color = Base.color
+ , useColors = Base.useColors
+ , util = require('util')
function Dump(runner) {
Base.call(this, runner);
@@ -9,7 +11,6 @@ function Dump(runner) {
var events = [
'start',
'version',
- 'end',
'suite',
'suite end',
'test',
@@ -26,14 +27,24 @@ function Dump(runner) {
events = args
}
+ runner.on('line', function (c) {
+ if (c.trim())
+ process.stderr.write(Base.color('bright yellow', c))
+ })
+
events.forEach(function (ev) {
- runner.on(ev, function () {
+ runner.on(ev, function (obj) {
console.log(ev)
if (arguments.length) {
- var args = [].concat.apply([], arguments)
- console.log.apply(console, args)
+ console.log(util.inspect(obj, false, Infinity, useColors))
console.log()
}
})
})
+
+ runner.on('end', function () {
+ console.log('end')
+ console.log(runner.stats)
+ console.log()
+ })
}
--
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