From 2a20b5709bf00954fa344ed45eb7f3b4ac73c2e3 Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Fri, 24 Feb 2023 14:36:10 +0200 Subject: [PATCH 1/2] fix(@jest/test-result): allow `TestResultsProcessor` to return a Promise --- packages/jest-test-result/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-test-result/src/types.ts b/packages/jest-test-result/src/types.ts index 3bb763d14b6e..9bff7590784c 100644 --- a/packages/jest-test-result/src/types.ts +++ b/packages/jest-test-result/src/types.ts @@ -77,7 +77,7 @@ export type AggregatedResult = AggregatedResultWithoutCoverage & { export type TestResultsProcessor = ( results: AggregatedResult, -) => AggregatedResult; +) => AggregatedResult | Promise; export type Suite = { title: string; From 0cb5d8c0c77a13b5d1d20598434f23ed5834c33a Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Fri, 24 Feb 2023 15:04:55 +0200 Subject: [PATCH 2/2] add change log entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f93141244e99..4ac7e81d9a9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - `[jest-circus]` Send test case results for `todo` tests ([#13915](https://github.com/facebook/jest/pull/13915)) - `[jest-circus]` Update message printed on test timeout ([#13830](https://github.com/facebook/jest/pull/13830)) +- `[@jest/test-result]` Allow `TestResultsProcessor` type to return a Promise ([#13950](https://github.com/facebook/jest/pull/13950)) ### Chore & Maintenance