mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
[improvement] optimize jest fn called judgement (#3029)
This commit is contained in:
@@ -14,7 +14,7 @@ test('submit', () => {
|
||||
|
||||
const button = wrapper.find('.van-button');
|
||||
button.trigger('click');
|
||||
expect(submit.mock.calls[0]).toBeTruthy();
|
||||
expect(submit).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('disable submit', () => {
|
||||
@@ -34,5 +34,5 @@ test('disable submit', () => {
|
||||
// disabled
|
||||
const button = wrapper.find('.van-button');
|
||||
button.trigger('click');
|
||||
expect(submit.mock.calls[0]).toBeFalsy();
|
||||
expect(submit).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user