Skip to content

Commit

Permalink
Return failure when coverage threshold isn’t met
Browse files Browse the repository at this point in the history
See: jestjs#3520

Fixed async calls to each reporter onRunComplete method
  • Loading branch information
Andre Valente committed May 11, 2017
1 parent 4ab665b commit 7940039
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/jest-cli/src/ReporterDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ class ReporterDispatcher {
}

async onRunComplete(contexts: Set<Context>, results: AggregatedResult) {
this._reporters.forEach(
reporter =>
reporter.onRunComplete && reporter.onRunComplete(contexts, results),
);
for (const reporter of this._reporters) {
reporter.onRunComplete && await reporter.onRunComplete(contexts, results);
}
}

// Return a list of last errors for every reporter
Expand Down

0 comments on commit 7940039

Please sign in to comment.