mirror of
https://github.com/apache/superset.git
synced 2026-04-28 04:25:07 +00:00
feat(fe): draft migration for RTL-based component test to Vitest
This commit is contained in:
@@ -24,7 +24,7 @@ const setup = (props = {}) => {
|
||||
const defaultProps = {
|
||||
name: 'rotation',
|
||||
value: 'square',
|
||||
onChange: jest.fn(),
|
||||
onChange: vi.fn(),
|
||||
};
|
||||
return render(<RotationControl {...defaultProps} {...props} />);
|
||||
};
|
||||
@@ -41,7 +41,7 @@ test('renders select with default value', () => {
|
||||
});
|
||||
|
||||
test('calls onChange when value changes', async () => {
|
||||
const onChange = jest.fn();
|
||||
const onChange = vi.fn();
|
||||
setup({ onChange, value: 'square' });
|
||||
|
||||
// Find the select input and open the dropdown
|
||||
|
||||
Reference in New Issue
Block a user