feat(fe): draft migration for RTL-based component test to Vitest

This commit is contained in:
hainenber
2026-03-04 22:44:20 +07:00
parent 4d05cdd78b
commit ea81614206
369 changed files with 3950 additions and 2702 deletions

View File

@@ -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