1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00
2020-11-08 20:33:20 +08:00

17 lines
352 B
JavaScript

import PasswordInput from '..';
import { mount } from '@vue/test-utils';
test('focus event', () => {
const focus = jest.fn();
const wrapper = mount(PasswordInput, {
context: {
on: {
focus,
},
},
});
wrapper.find('.van-password-input__security').trigger('touchstart');
expect(focus).toHaveBeenCalledTimes(1);
});