Skip to content

Commit

Permalink
Failure when coverage threshold not met (#3554)
Browse files Browse the repository at this point in the history
* Return failure when coverage threshold isn’t met

See: #3520

Fixed async calls to each reporter onRunComplete method

* Run prettier
  • Loading branch information
andrefarfetch authored and aaronabramov committed May 12, 2017
1 parent e4db404 commit 3256e15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/jest-cli/src/ReporterDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ 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 3256e15

Please sign in to comment.