[Pkg-javascript-commits] [node-tap-mocha-reporter] 30/137: expose set of valid formatter types

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:23 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 658f3126cee3ed3063d3ee952d1a804caa1e4ddf
Author: isaacs <i at izs.me>
Date:   Sun Apr 26 11:12:34 2015 -0700

    expose set of valid formatter types
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index dbace81..6faf0bc 100755
--- a/index.js
+++ b/index.js
@@ -4,6 +4,7 @@ module.exports = Formatter
 
 var util = require('util')
 var reporters = require('./lib/reporters/index.js')
+Formatter.types = Object.keys(reporters).sort()
 var Writable = require('stream').Writable
 var Runner = require('./lib/runner.js')
 var Parser = require('tap-parser')
@@ -53,7 +54,7 @@ Formatter.prototype.end = function () {
 }
 
 function avail () {
-  var types = Object.keys(reporters).sort().reduce(function (str, t) {
+  var types = Formatter.types.reduce(function (str, t) {
     var ll = str.split('\n').pop().length + t.length
     if (ll < 40)
       return str + ' ' + t

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