mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
test: add typing for some test cases (#8243)
This commit is contained in:
@@ -28,8 +28,8 @@ test('should emit cancel event when cancel button click is clicked', () => {
|
||||
const cancel = wrapper.find('.van-search__action');
|
||||
cancel.trigger('click');
|
||||
|
||||
expect(wrapper.emitted('cancel').length).toEqual(1);
|
||||
expect(wrapper.emitted('update:modelValue')[0][0]).toEqual('');
|
||||
expect(wrapper.emitted('cancel')!.length).toEqual(1);
|
||||
expect(wrapper.emitted('update:modelValue')![0]).toEqual(['']);
|
||||
});
|
||||
|
||||
test('should not emit cancel event when using action slot', () => {
|
||||
@@ -56,7 +56,7 @@ test('should emit search event when enter key is pressed', () => {
|
||||
input.trigger('keypress.enter');
|
||||
input.trigger('keypress.a');
|
||||
|
||||
expect(wrapper.emitted('search').length).toEqual(1);
|
||||
expect(wrapper.emitted('search')!.length).toEqual(1);
|
||||
});
|
||||
|
||||
test('should render label slot correctly', () => {
|
Reference in New Issue
Block a user