Skip to content

Commit

Permalink
Move test summary to after coverage report #4104
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Oct 7, 2017
1 parent 7b0e108 commit 74a3841
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 @@ -226,10 +226,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 @@ -244,13 +244,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 74a3841

Please sign in to comment.