chore(fe): replace deprecate aliased Jest matchers with corresponding substituents (#30355)

Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
Đỗ Trọng Hải
2024-10-30 01:27:20 +07:00
committed by GitHub
parent f2a9f31135
commit 576ad85eb4
48 changed files with 294 additions and 293 deletions

View File

@@ -91,9 +91,9 @@ test('Should send correct props to Select component - value props', async () =>
test('Should send correct props to Select component - function onChange multi:true', async () => {
const props = createProps();
render(<SelectAsyncControl {...props} />, { useRedux: true });
expect(props.onChange).toBeCalledTimes(0);
expect(props.onChange).toHaveBeenCalledTimes(0);
userEvent.click(await screen.findByText('onChange'));
expect(props.onChange).toBeCalledTimes(1);
expect(props.onChange).toHaveBeenCalledTimes(1);
});
test('Should send correct props to Select component - function onChange multi:false', async () => {
@@ -101,7 +101,7 @@ test('Should send correct props to Select component - function onChange multi:fa
render(<SelectAsyncControl {...{ ...props, multi: false }} />, {
useRedux: true,
});
expect(props.onChange).toBeCalledTimes(0);
expect(props.onChange).toHaveBeenCalledTimes(0);
userEvent.click(await screen.findByText('onChange'));
expect(props.onChange).toBeCalledTimes(1);
expect(props.onChange).toHaveBeenCalledTimes(1);
});