Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Added stack trace to TAP errors. Closes #52

Tj Holowaychuk932ed289122f
diff --git a/lib/reporters/tap.js b/lib/reporters/tap.js
index d0cdc420..15e9021f 100644
--- a/lib/reporters/tap.js
+++ b/lib/reporters/tap.js
@@ -40,8 +40,9 @@ function TAP(runner) {
console.log('ok %d %s', n, test.fullTitle());
});
- runner.on('fail', function(test){
+ runner.on('fail', function(test, err){
console.log('not ok %d %s', n, test.fullTitle());
+ console.log(err.stack.replace(/^/gm, ' '));
});
runner.on('end', function(){