Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
- Change generic to meaningful name
- Update CHANGELOG
  • Loading branch information
Mark1626 committed Aug 5, 2020
1 parent 2fc2b8b commit 4fdb1c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
12 changes: 8 additions & 4 deletions packages/jest-types/src/Global.ts
Expand Up @@ -29,18 +29,22 @@ export type EachTable = ArrayTable | TemplateTable;

export type TestCallback = BlockFn | TestFn | ConcurrentTestFn;

export type EachTestFn<A extends TestCallback> = (
export type EachTestFn<EachCallback extends TestCallback> = (
...args: Array<any>
) => ReturnType<A>;
) => ReturnType<EachCallback>;

// TODO: Get rid of this at some point
type Jasmine = {_DEFAULT_TIMEOUT_INTERVAL?: number; addMatchers: Function};

type Each<A extends TestCallback> =
type Each<EachCallback extends TestCallback> =
| ((
table: EachTable,
...taggedTemplateData: Array<unknown>
) => (title: string, test: EachTestFn<A>, timeout?: number) => void)
) => (
title: string,
test: EachTestFn<EachCallback>,
timeout?: number,
) => void)
| (() => void);

export interface ItBase {
Expand Down

0 comments on commit 4fdb1c7

Please sign in to comment.