chore: replace deprecated jest matchers (#53759)

This commit is contained in:
Huyen Nguyen
2024-02-16 16:17:35 +07:00
committed by GitHub
parent 3477265b25
commit dc369b0937
5 changed files with 38 additions and 38 deletions
@@ -69,7 +69,7 @@ describe('<Button />', () => {
userEvent.click(button);
expect(onClick).not.toBeCalled();
expect(onClick).not.toHaveBeenCalled();
});
it('should render an anchor element if the `href` prop is defined', () => {
@@ -122,7 +122,7 @@ describe('<DropDownButton>', () => {
const Item = within(unorderedList).getByText('Hello world');
userEvent.click(Item);
expect(onClick).not.toBeCalled();
expect(onClick).not.toHaveBeenCalled();
});
it('should render an anchor element if the `href` prop is defined', () => {
@@ -17,7 +17,7 @@ describe('<ToggleButton />', () => {
userEvent.click(screen.getByRole('button', { name: /on/i }));
expect(onChange).toBeCalledTimes(1);
expect(onChange).toHaveBeenCalledTimes(1);
});
it('should be checked if checked prop is true', () => {
@@ -59,7 +59,7 @@ describe('<ToggleButton />', () => {
userEvent.click(screen.getByRole('button', { name: /on/i }));
expect(onChange).not.toBeCalled();
expect(onChange).not.toHaveBeenCalled();
});
it('should have value property if radio', () => {