diff --git a/lib/runner.js b/lib/runner.js index 366b41081a..a6c72d1519 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -822,10 +822,8 @@ Runner.prototype.run = function (fn) { // callback this.on('end', function () { var failures = self.failures; - if (self.forbidOnly) { - if (self.hasOnly) { - failures += self.stats.tests; - } + if (self.forbidOnly and self.hasOnly) { + failures += self.stats.tests; } if (self.forbidPending) { failures += self.stats.pending;