mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[improvement] optimize jest fn called judgement (#3029)
This commit is contained in:
@@ -80,9 +80,9 @@ test('click event', () => {
|
||||
});
|
||||
|
||||
wrapper.trigger('click');
|
||||
expect(onClick.mock.calls.length).toEqual(1);
|
||||
expect(onClick).toHaveBeenCalledTimes(1);
|
||||
|
||||
const icon = wrapper.find('.van-checkbox__icon');
|
||||
icon.trigger('click');
|
||||
expect(onClick.mock.calls.length).toEqual(2);
|
||||
expect(onClick).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
Reference in New Issue
Block a user