From 4fdb1c72bdc46e49ec0cb02aa54a87c1a736d7fe Mon Sep 17 00:00:00 2001 From: Mark1626 Date: Wed, 5 Aug 2020 19:17:45 +0530 Subject: [PATCH] Review changes - Change generic to meaningful name - Update CHANGELOG --- CHANGELOG.md | 2 +- packages/jest-types/src/Global.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5498d707a08..eed9f3c0eec2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - `[jest-circus, jest-jasmine2]` Include `failureDetails` property in test results ([#9496](https://github.com/facebook/jest/pull/9496)) +- `[jest-each, jest-jasmine, jest-circus]` Add support for .concurrent.each ([#9326](https://github.com/facebook/jest/pull/9326)) ### Fixes @@ -35,7 +36,6 @@ - `[jest-worker]` Added support for workers to send custom messages to parent in jest-worker ([#10293](https://github.com/facebook/jest/pull/10293)) - `[jest-worker]` Support passing `resourceLimits` ([#10335](https://github.com/facebook/jest/pull/10335)) - `[pretty-format]` Added support for serializing custom elements (web components) ([#10217](https://github.com/facebook/jest/pull/10237)) -- `[jest-each, jest-jasmine, jest-circus]` Add support for .concurrent.each ([#9326](https://github.com/facebook/jest/pull/9326)) ### Fixes diff --git a/packages/jest-types/src/Global.ts b/packages/jest-types/src/Global.ts index 3df63717d636..2102d0c0e4b4 100644 --- a/packages/jest-types/src/Global.ts +++ b/packages/jest-types/src/Global.ts @@ -29,18 +29,22 @@ export type EachTable = ArrayTable | TemplateTable; export type TestCallback = BlockFn | TestFn | ConcurrentTestFn; -export type EachTestFn = ( +export type EachTestFn = ( ...args: Array -) => ReturnType; +) => ReturnType; // TODO: Get rid of this at some point type Jasmine = {_DEFAULT_TIMEOUT_INTERVAL?: number; addMatchers: Function}; -type Each = +type Each = | (( table: EachTable, ...taggedTemplateData: Array - ) => (title: string, test: EachTestFn, timeout?: number) => void) + ) => ( + title: string, + test: EachTestFn, + timeout?: number, + ) => void) | (() => void); export interface ItBase {