diff --git a/lib/reporter.js b/lib/reporter.js index f66f50e..fc23c5d 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -291,21 +291,20 @@ var generateReport = function (options) { } if (step.result.duration) element.time += step.result.duration; - - if (step.result.status === result.status.passed) { + + switch (step.result.status) { + case result.status.passed: return element.passed++; - } - if (step.result.status === result.status.failed) { + case result.status.failed: return element.failed++; - } - if (step.result.status === result.status.undefined) { - return element.notdefined++; - } - if (step.result.status === result.status.pending) { + case result.status.undefined: + return element.undefined++; + case result.status.pending: return element.pending++; - } - if (step.result.status === result.status.ambiguous) { + case result.status.ambiguous: return element.ambiguous++; + default: + break; } element.skipped++;