mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore: replace deprecated jest matchers (#53759)
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user