Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Fixed: use Runner#total for accurate reporting

Tj Holowaychukfa8b4833dd37
diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index 1d8e996e..6b0b28ae 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -144,6 +144,7 @@ function Base(runner) {
, failures = this.failures = [];
if (!runner) return;
+ this.runner = runner;
runner.on('start', function(){
stats.start = new Date;
@@ -204,7 +205,7 @@ Base.prototype.epilogue = function(){
+ color('fail', ' %d of %d tests failed')
+ color('light', ':')
- console.error(fmt, stats.failures, stats.tests);
+ console.error(fmt, stats.failures, this.runner.total);
Base.list(this.failures);
console.error();
process.nextTick(function(){