test: improve test cases typing (#8202)

This commit is contained in:
neverland
2021-02-23 20:54:28 +08:00
committed by GitHub
parent 1170262d72
commit 2168382917
9 changed files with 50 additions and 46 deletions
+2 -2
View File
@@ -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<[boolean]>('update:show')[0][0]).toEqual(false);
expect(wrapper.emitted('update:show')[0]).toEqual([false]);
expect(wrapper.emitted('cancel')[0]).toBeTruthy();
});
@@ -102,5 +102,5 @@ test('should emit click-overlay event when overlay is clicked', async () => {
const overlay = root.querySelector('.van-overlay')!;
trigger(overlay, 'click');
expect(onClickOverlay).toHaveBeenCalledTimes(1);
expect(wrapper.emitted<[boolean]>('update:show')[0][0]).toEqual(false);
expect(wrapper.emitted('update:show')[0]).toEqual([false]);
});