Skip to content

Commit

Permalink
Move test summary to after coverage report #4104 (#4512)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored and cpojer committed Feb 7, 2018
1 parent 1947496 commit e4d03fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/jest-cli/src/test_scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ export default class TestScheduler {
const isDefault = this._shouldAddDefaultReporters(reporters);

if (isDefault) {
this._setupDefaultReporters();
this._setupDefaultReporters(collectCoverage);
}

if (collectCoverage) {
if (!isDefault && collectCoverage) {
this.addReporter(new CoverageReporter(this._globalConfig));
}

Expand All @@ -279,13 +279,17 @@ export default class TestScheduler {
}
}

_setupDefaultReporters() {
_setupDefaultReporters(collectCoverage: boolean) {
this.addReporter(
this._globalConfig.verbose
? new VerboseReporter(this._globalConfig)
: new DefaultReporter(this._globalConfig),
);

if (collectCoverage) {
this.addReporter(new CoverageReporter(this._globalConfig));
}

this.addReporter(new SummaryReporter(this._globalConfig));
}

Expand Down

0 comments on commit e4d03fb

Please sign in to comment.