diff --git a/lib/reporters/base.js b/lib/reporters/base.js index b21fefa21f..d8687c7278 100644 --- a/lib/reporters/base.js +++ b/lib/reporters/base.js @@ -182,10 +182,13 @@ exports.list = function(failures){ // actual / expected diff if ('string' == typeof actual && 'string' == typeof expected) { fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); + var match = message.match(/^([^:]+): expected/); + msg = match ? '\n ' + color('error message', match[1]) : ''; + if (exports.inlineDiffs) { - msg = inlineDiff(err, escape); + msg += inlineDiff(err, escape); } else { - msg = unifiedDiff(err, escape); + msg += unifiedDiff(err, escape); } } @@ -462,3 +465,5 @@ function sameType(a, b) { b = Object.prototype.toString.call(b); return a == b; } + +