Skip to content

Commit

Permalink
Merge pull request mochajs#681 from opichals/no-stack-on-leakdetect
Browse files Browse the repository at this point in the history
The Runner.checkGlobals new Error doesn't provide err.stack.
  • Loading branch information
tj committed Dec 7, 2012
2 parents 652df5f + 0c397fe commit 0eb8c2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reporters/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function TAP(runner) {
runner.on('fail', function(test, err){
failures++;
console.log('not ok %d %s', n, title(test));
console.log(err.stack.replace(/^/gm, ' '));
if (err.stack) console.log(err.stack.replace(/^/gm, ' '));
});

runner.on('end', function(){
Expand Down
2 changes: 1 addition & 1 deletion mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,7 @@ function TAP(runner) {
runner.on('fail', function(test, err){
failures++;
console.log('not ok %d %s', n, title(test));
console.log(err.stack.replace(/^/gm, ' '));
if (err.stack) console.log(err.stack.replace(/^/gm, ' '));
});

runner.on('end', function(){
Expand Down

0 comments on commit 0eb8c2d

Please sign in to comment.