types: test cases typing

This commit is contained in:
chenjiahan
2021-02-11 13:04:00 +08:00
parent 7a5fb894d2
commit e2e0f66fe6
87 changed files with 129 additions and 121 deletions
@@ -1,5 +1,5 @@
import Badge from '..';
import { mount } from '@vue/test-utils';
import { mount } from '../../../test';
test('should render nothing when content is empty string', () => {
const wrapper = mount(Badge, {
@@ -52,7 +52,7 @@ test('should change dot position when using offset prop', () => {
},
});
const badge = wrapper.find('.van-badge').element;
const badge = wrapper.find('.van-badge');
expect(badge.style.top).toEqual('4px');
expect(badge.style.right).toEqual('-2px');
});
@@ -65,7 +65,7 @@ test('should change dot position when using offset prop without children', () =>
},
});
const badge = wrapper.find('.van-badge').element;
const badge = wrapper.find('.van-badge');
expect(badge.style.marginTop).toEqual('4px');
expect(badge.style.marginLeft).toEqual('2px');
});