mirror of
https://github.com/apache/superset.git
synced 2026-06-01 13:49:21 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user