Skip to content

Commit

Permalink
Display error stack if available in simple reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Nov 20, 2014
1 parent c483809 commit 961b348
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/simpleReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ function expectedString(test) {
}

function actualString(test) {
if(test.errorName) {
if(test.errorStack) {
return test.errorStack
.split("\n")
.map(function(v) { return " " + v.trim()})
.join("\n")
.trim();
} else if(test.errorName) {
if(test.errorMessage) {
return test.errorName + ": " + test.errorMessage;
} else {
Expand Down

0 comments on commit 961b348

Please sign in to comment.