From 5f6bc405ddaac8c30ea09a35376281a8c0707003 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 27 Sep 2018 16:50:59 -0400 Subject: [PATCH] Added failure count to test case reporter. --- tests/reporter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/reporter.js b/tests/reporter.js index 7b42d9228..16610bd5d 100644 --- a/tests/reporter.js +++ b/tests/reporter.js @@ -47,7 +47,11 @@ function Reporter(runner) { runner.on('suite end', function() { var suite = suites.pop(); - log(' Total Tests: ' + suite._countPass + '/' + suite._countTotal + ' passed ' + getDelta(suite._t0)); + var failure = ''; + if (suite._countTotal > suite._countPass) { + failure = ' (' + (suite._countTotal - suite._countPass) + ' failed)'; + } + log(' Total Tests: ' + suite._countPass + '/' + suite._countTotal + ' passed ' + getDelta(suite._t0) + failure); log(); if (suites.length > 0) { var currentSuite = suites[suites.length - 1];