Skip to content

Commit

Permalink
Don’t subtract the number of test suites with runtime errors from the…
Browse files Browse the repository at this point in the history
… total. This is confusing.

Assuming only two test suites have no-runtime errors here is the output:

Previously: 77 tests failed, 8 test suites failed, 9 tests passed (86 total in 2 test suites, run time 3.33s)
New: 77 tests failed, 8 test suites failed, 9 tests passed (86 total in 15 test suites, run time 3.33s)

(I know this has nothing to do with node-haste, but it is annoying while I try to make the tests pass and I don’t know what’s up. Sue me!)
  • Loading branch information
cpojer committed Nov 16, 2015
1 parent 620ea9e commit f518a92
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/DefaultTestReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class DefaultTestReporter {
}

onRunComplete(config, aggregatedResults) {
const numTotalTestSuites = aggregatedResults.numTotalTestSuites;
const numFailedTests = aggregatedResults.numFailedTests;
const numPassedTests = aggregatedResults.numPassedTests;
const numTotalTests = aggregatedResults.numTotalTests;
Expand Down Expand Up @@ -152,13 +153,9 @@ class DefaultTestReporter {
colors.GREEN + colors.BOLD
);

const numTestSuitesExecuted =
aggregatedResults.numTotalTestSuites -
aggregatedResults.numRuntimeErrorTestSuites;

results += ' (' + numTotalTests + ' total in ' +
numTestSuitesExecuted + ' ' +
'test suite' + (numTestSuitesExecuted === 1 ? '' : 's') +
numTotalTestSuites + ' ' +
'test suite' + (numTotalTestSuites === 1 ? '' : 's') +
', run time ' + runTime + 's)';

this.log(results);
Expand Down

0 comments on commit f518a92

Please sign in to comment.