Skip to content

Commit

Permalink
Fix toHaveBeenCalledBefore/toHaveBeenCalledAfter mock param types (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
aheuermann committed Jul 19, 2022
1 parent 9d5d236 commit be7bc8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/index.d.ts
Expand Up @@ -154,7 +154,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoSecondInvocation=true]
*/
toHaveBeenCalledBefore(mock: jest.Mock, failIfNoSecondInvocation?: boolean): R;
toHaveBeenCalledBefore(mock: jest.MockInstance<any, any[]>, failIfNoSecondInvocation?: boolean): R;

/**
* Use `.toHaveBeenCalledAfter` when checking if a `Mock` was called after another `Mock`.
Expand All @@ -164,7 +164,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoFirstInvocation=true]
*/
toHaveBeenCalledAfter(mock: jest.Mock, failIfNoFirstInvocation?: boolean): R;
toHaveBeenCalledAfter(mock: jest.MockInstance<any, any[]>, failIfNoFirstInvocation?: boolean): R;

/**
* Use `.toHaveBeenCalledOnce` to check if a `Mock` was called exactly one time.
Expand Down Expand Up @@ -579,7 +579,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoSecondInvocation=true]
*/
toHaveBeenCalledBefore(mock: jest.Mock, failIfNoSecondInvocation: boolean): any;
toHaveBeenCalledBefore(mock: jest.MockInstance<any, any[]>, failIfNoSecondInvocation: boolean): any;

/**
* Use `.toHaveBeenCalledAfter` when checking if a `Mock` was called after another `Mock`.
Expand All @@ -589,7 +589,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoFirstInvocation=true]
*/
toHaveBeenCalledAfter(mock: jest.Mock, failIfNoFirstInvocation: boolean): any;
toHaveBeenCalledAfter(mock: jest.MockInstance<any, any[]>, failIfNoFirstInvocation: boolean): any;

/**
* Use `.toHaveBeenCalledOnce` to check if a `Mock` was called exactly one time.
Expand Down

0 comments on commit be7bc8e

Please sign in to comment.