diff --git a/tests/Tags.test.tsx b/tests/Tags.test.tsx index 5a4ad6e6..28e033bd 100644 --- a/tests/Tags.test.tsx +++ b/tests/Tags.test.tsx @@ -730,7 +730,7 @@ describe('Select.Tags', () => { fireEvent.change(input, { target: { value: 'test' }, }); - expect(onChange).not.toBeCalled(); + expect(onChange).not.toHaveBeenCalled(); }); // https://github.com/ant-design/ant-design/issues/56587 diff --git a/tests/shared/allowClearTest.tsx b/tests/shared/allowClearTest.tsx index 8974d7f4..33ee90f3 100644 --- a/tests/shared/allowClearTest.tsx +++ b/tests/shared/allowClearTest.tsx @@ -59,7 +59,7 @@ export default function allowClearTest(mode: any, value: any) { } else { expect(onChange).toHaveBeenCalledWith(undefined, undefined); } - expect(onDeselect).not.toBeCalled(); + expect(onDeselect).not.toHaveBeenCalled(); expect(container.querySelector('input').value).toEqual(''); expect(onClear).toHaveBeenCalled(); }); @@ -100,7 +100,7 @@ export default function allowClearTest(mode: any, value: any) { } else { expect(onChange).toHaveBeenCalledWith(undefined, undefined); } - expect(onDeselect).not.toBeCalled(); + expect(onDeselect).not.toHaveBeenCalled(); expect(container.querySelector('input').value).toEqual(''); expect(onClear).toHaveBeenCalled(); }); diff --git a/tests/shared/hoverTest.tsx b/tests/shared/hoverTest.tsx index 0c0f39ae..9f38daf9 100644 --- a/tests/shared/hoverTest.tsx +++ b/tests/shared/hoverTest.tsx @@ -14,8 +14,8 @@ export default function hoverTest(mode: any) { ); fireEvent.mouseEnter(container.querySelector('.rc-select')); - expect(onMouseEnter).toBeCalled(); + expect(onMouseEnter).toHaveBeenCalled(); fireEvent.mouseLeave(container.querySelector('.rc-select')); - expect(onMouseLeave).toBeCalled(); + expect(onMouseLeave).toHaveBeenCalled(); }); } diff --git a/tests/shared/removeSelectedTest.tsx b/tests/shared/removeSelectedTest.tsx index 7bb28ed7..bed58818 100644 --- a/tests/shared/removeSelectedTest.tsx +++ b/tests/shared/removeSelectedTest.tsx @@ -19,11 +19,11 @@ export default function removeSelectedTest(mode: any) { ); removeSelection(container); - expect(handleDeselect).toBeCalledWith( + expect(handleDeselect).toHaveBeenCalledWith( '1', expect.objectContaining({ value: '1', testprop: 'deselect' }), ); - expect(handleChange).toBeCalledWith(['2'], expect.anything()); + expect(handleChange).toHaveBeenCalledWith(['2'], expect.anything()); }); it('noop if select is disabled', () => {