test: fix index.spec.ts typing (#8201)
This commit is contained in:
@@ -68,7 +68,7 @@ test('should emit cancel event when the cancel button is clicked', () => {
|
||||
|
||||
wrapper.find('.van-share-sheet__cancel').trigger('click');
|
||||
|
||||
expect(wrapper.emitted('update:show')[0][0]).toEqual(false);
|
||||
expect(wrapper.emitted<[boolean]>('update:show')[0][0]).toEqual(false);
|
||||
expect(wrapper.emitted('cancel')[0]).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -99,8 +99,8 @@ test('should emit click-overlay event when overlay is clicked', async () => {
|
||||
|
||||
await later();
|
||||
|
||||
const overlay = root.querySelector('.van-overlay');
|
||||
const overlay = root.querySelector('.van-overlay')!;
|
||||
trigger(overlay, 'click');
|
||||
expect(onClickOverlay).toHaveBeenCalledTimes(1);
|
||||
expect(wrapper.emitted('update:show')[0][0]).toEqual(false);
|
||||
expect(wrapper.emitted<[boolean]>('update:show')[0][0]).toEqual(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user