diff --git a/packages/jest-cli/src/ReporterDispatcher.js b/packages/jest-cli/src/ReporterDispatcher.js index 9d3510fb4da8..d02eebac5bc4 100644 --- a/packages/jest-cli/src/ReporterDispatcher.js +++ b/packages/jest-cli/src/ReporterDispatcher.js @@ -59,10 +59,10 @@ class ReporterDispatcher { } async onRunComplete(contexts: Set, 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