Skip to content

Commit

Permalink
more precise circus asyncError types (#8150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeysal authored and SimenB committed Mar 19, 2019
1 parent b97ac39 commit 8cec4cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/jest-circus/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type TestContext = Record<string, any>;
export type Exception = any; // Since in JS anything can be thrown as an error.
export type FormattedError = string; // String representation of error.
export type Hook = {
asyncError: Exception;
asyncError: Error;
fn: HookFn;
type: HookType;
parent: DescribeBlock;
Expand All @@ -41,7 +41,7 @@ export type Event =
name: 'include_test_location_in_result';
}
| {
asyncError: Exception;
asyncError: Error;
mode: BlockMode;
name: 'start_describe_definition';
blockName: BlockName;
Expand All @@ -52,14 +52,14 @@ export type Event =
blockName: BlockName;
}
| {
asyncError: Exception;
asyncError: Error;
name: 'add_hook';
hookType: HookType;
fn: HookFn;
timeout: number | undefined;
}
| {
asyncError: Exception;
asyncError: Error;
name: 'add_test';
testName: TestName;
fn?: TestFn;
Expand Down

0 comments on commit 8cec4cd

Please sign in to comment.