mirror of
https://github.com/youzan/vant.git
synced 2026-05-16 01:07:43 +08:00
test: fix index.spec.ts typing (#8201)
This commit is contained in:
@@ -13,7 +13,7 @@ test('should emit load event after image loaded', async () => {
|
||||
|
||||
await wrapper.find('img').trigger('load');
|
||||
|
||||
expect(wrapper.emitted('load')[0][0]).toBeTruthy();
|
||||
expect(wrapper.emitted<[Event]>('load')[0][0]).toBeTruthy();
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ test('should emit error event when load image failed', () => {
|
||||
});
|
||||
|
||||
wrapper.find('img').trigger('error');
|
||||
expect(wrapper.emitted('error')[0][0]).toBeTruthy();
|
||||
expect(wrapper.emitted<[Event]>('error')[0][0]).toBeTruthy();
|
||||
});
|
||||
|
||||
test('should render loading placeholder when using lazy-load prop', () => {
|
||||
|
||||
Reference in New Issue
Block a user