You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import Checkbox from '..';
|
|
|
|
import focusTest from '../../../tests/shared/focusTest';
|
|
|
|
|
|
|
|
describe('Checkbox', () => {
|
|
|
|
focusTest(Checkbox);
|
|
|
|
it('responses hover events', () => {
|
|
|
|
const onMouseEnter = jest.fn();
|
|
|
|
const onMouseLeave = jest.fn();
|
|
|
|
|
|
|
|
const wrapper = mount(Checkbox, {
|
|
|
|
listeners: {
|
|
|
|
mouseenter: onMouseEnter,
|
|
|
|
mouseleave: onMouseLeave,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
wrapper.trigger('mouseenter');
|
|
|
|
expect(onMouseEnter).toHaveBeenCalled();
|
|
|
|
|
|
|
|
wrapper.trigger('mouseleave');
|
|
|
|
expect(onMouseLeave).toHaveBeenCalled();
|
|
|
|
});
|
|
|
|
});
|