From 9d89943b5fa93bee0b94439ec9e6430adeb8e565 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Tue, 28 May 2013 14:54:54 -0700 Subject: [PATCH] log the count of passed/skipped tests even when a test fails --- lib/reporters/base.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/reporters/base.js b/lib/reporters/base.js index b7e9bcf464..35bf5645cf 100644 --- a/lib/reporters/base.js +++ b/lib/reporters/base.js @@ -289,22 +289,6 @@ Base.prototype.epilogue = function(){ return 1 == n ? 'test' : 'tests'; } - // failure - if (stats.failures) { - fmt = color('bright fail', ' ' + exports.symbols.err) - + color('fail', ' %d of %d %s failed') - + color('light', ':') - - console.error(fmt, - stats.failures, - this.runner.total, - pluralize(this.runner.total)); - - Base.list(this.failures); - console.error(); - return; - } - // pass fmt = color('bright pass', ' ') + color('green', ' %d %s complete') @@ -323,6 +307,21 @@ Base.prototype.epilogue = function(){ console.log(fmt, stats.pending, pluralize(stats.pending)); } + // failure + if (stats.failures) { + fmt = color('bright fail', ' ' + exports.symbols.err) + + color('fail', ' %d of %d %s failed') + + color('light', ':') + + console.error(fmt, + stats.failures, + this.runner.total, + pluralize(this.runner.total)); + + Base.list(this.failures); + console.error(); + } + console.log(); };