Comparing version 0.3.0 to 0.3.1
@@ -73,4 +73,4 @@ var Stream = require('stream'); | ||
var ex = json.stringify(res.expected) || ''; | ||
var ac = json.stringify(res.actual) || ''; | ||
var ex = json.stringify(res.expected, getSerialize()) || ''; | ||
var ac = json.stringify(res.actual, getSerialize()) || ''; | ||
@@ -102,1 +102,26 @@ if (Math.max(ex.length, ac.length) > 65) { | ||
} | ||
function getSerialize() { | ||
var seen = []; | ||
return function (key, value) { | ||
var ret = value; | ||
if (typeof value === 'object' && value) { | ||
var found = false | ||
for (var i = 0; i < seen.length; i++) { | ||
if (seen[i] === value) { | ||
found = true | ||
break; | ||
} | ||
} | ||
if (found) { | ||
ret = '[Circular]' | ||
} else { | ||
seen.push(value) | ||
} | ||
} | ||
return ret | ||
} | ||
} |
{ | ||
"name" : "tape", | ||
"version" : "0.3.0", | ||
"version" : "0.3.1", | ||
"description" : "tap-producing test harness for node and browsers", | ||
@@ -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
53346
41
1577