Skip to content

Commit

Permalink
Update packages/expect/src/__tests__/customEqualityTesters.test.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
  • Loading branch information
andrewiggins and mrazauskas committed Dec 2, 2022
1 parent 144f351 commit 1c9b629
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/expect/src/__tests__/customEqualityTesters.test.ts
Expand Up @@ -138,7 +138,9 @@ describe('without custom equality testers', () => {
});

it('spy matchers do not pass different special objects', () => {
const mockFn: (...args: Array<any>) => any = jest.fn(() => specialReturn1);
const mockFn = jest.fn<(...args: Array<unknown>) => unknown>(
() => specialReturn1,
);
mockFn(...testArgs);

expect(mockFn).not.toHaveBeenCalledWith(...expectedArgs);
Expand Down Expand Up @@ -201,7 +203,9 @@ describe('with custom equality testers', () => {
});

it('spy matchers pass different special objects', () => {
const mockFn: (...args: Array<any>) => any = jest.fn(() => specialReturn1);
const mockFn = jest.fn<(...args: Array<unknown>) => unknown>(
() => specialReturn1,
);
mockFn(...testArgs);

expect(mockFn).toHaveBeenCalledWith(...expectedArgs);
Expand Down

0 comments on commit 1c9b629

Please sign in to comment.