tap-mocha-reporter
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -15,2 +15,6 @@ exports = module.exports = Classic | ||
function repeat (n, c) { | ||
return new Array(Math.max(n + 1, 0)).join(c) | ||
} | ||
function hasOwnProperty (obj, key) { | ||
@@ -162,3 +166,3 @@ return Object.prototype.hasOwnProperty.call(obj, key) | ||
if (uclen(line) < width) | ||
line += new Array(width - uclen(line) + 1).join(' ') | ||
line += repeat(width - uclen(line) + 1, ' ') | ||
return line | ||
@@ -177,3 +181,3 @@ }).map(function (line) { | ||
(Base.useColors | ||
? new Array(width - '+++ found'.length + 1).join(' ') | ||
? repeat(width - '+++ found'.length + 1, ' ') | ||
: '') + | ||
@@ -183,3 +187,3 @@ reset + '\n' + | ||
(Base.useColors | ||
? new Array(width - '--- wanted'.length + 1).join(' ') | ||
? repeat(width - '--- wanted'.length + 1, ' ') | ||
: '') + | ||
@@ -254,6 +258,6 @@ reset + '\n' | ||
var num = pass + '/' + total | ||
var dots = len - uclen(title) - uclen(num) - 2 | ||
if (dots < 3) | ||
dots = 3 | ||
dots = ' ' + new Array(dots).join('.') + ' ' | ||
var dots = len - uclen(title) - uclen(num) - 3 | ||
if (dots < 2) | ||
dots = 2 | ||
dots = ' ' + repeat(dots, '.') + ' ' | ||
if (fails.length) | ||
@@ -404,5 +408,5 @@ num = Base.color('fail', num) | ||
function indent (str, n) { | ||
var ind = new Array(n + 1).join(' ') | ||
var ind = repeat(n, ' ') | ||
str = ind + str.split('\n').join('\n' + ind) | ||
return str.replace(/(\n\s*)+$/, '\n') | ||
} |
{ | ||
"name": "tap-mocha-reporter", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Format a TAP stream using Mocha's set of reporters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110410
3268