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:
@@ -31,7 +31,7 @@ test('disabled', () => {
|
||||
});
|
||||
|
||||
wrapper.vm.onChange(file);
|
||||
expect(afterRead.mock.calls.length).toBeFalsy();
|
||||
expect(afterRead).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it('read text', done => {
|
||||
@@ -57,7 +57,7 @@ it('unknown resultType', () => {
|
||||
}
|
||||
});
|
||||
wrapper.vm.onChange(file);
|
||||
expect(afterRead.mock.calls.length).toBeFalsy();
|
||||
expect(afterRead).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it('before read return false', () => {
|
||||
@@ -72,7 +72,7 @@ it('before read return false', () => {
|
||||
const input = wrapper.find('input');
|
||||
|
||||
wrapper.vm.onChange(file);
|
||||
expect(afterRead.mock.calls.length).toBeFalsy();
|
||||
expect(afterRead).toHaveBeenCalledTimes(0);
|
||||
expect(input.element.value).toEqual('');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user