Skip to content

Commit

Permalink
Move test summary to after coverage report jestjs#4104
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Sep 19, 2017
1 parent ecbdeda commit f60798c
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 @@ -227,10 +227,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 @@ -245,13 +245,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 f60798c

Please sign in to comment.