Skip to content

Commit

Permalink
Change unknown to any in toHaveBeenCalledBefore and toHaveBeenCalledA…
Browse files Browse the repository at this point in the history
…fter (closes #552)

---------

Co-authored-by: Keegan Witt <keeganwitt@gmail.com>
  • Loading branch information
wh1t3cAt1k and keeganwitt committed Jun 5, 2023
1 parent cb3913e commit 633e318
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/index.d.ts
Expand Up @@ -146,7 +146,7 @@ interface CustomMatchers<R> extends Record<string, any> {
* @param {Mock} mock
* @param {boolean} [failIfNoSecondInvocation=true]
*/
toHaveBeenCalledBefore(mock: jest.MockInstance<unknown, unknown[]>, 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 @@ -156,7 +156,7 @@ interface CustomMatchers<R> extends Record<string, any> {
* @param {Mock} mock
* @param {boolean} [failIfNoFirstInvocation=true]
*/
toHaveBeenCalledAfter(mock: jest.MockInstance<unknown, unknown[]>, 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 @@ -580,7 +580,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoSecondInvocation=true]
*/
toHaveBeenCalledBefore(mock: jest.MockInstance<unknown, unknown[]>, 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 @@ -590,7 +590,7 @@ declare namespace jest {
* @param {Mock} mock
* @param {boolean} [failIfNoFirstInvocation=true]
*/
toHaveBeenCalledAfter(mock: jest.MockInstance<unknown, unknown[]>, 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

0 comments on commit 633e318

Please sign in to comment.