types: test cases typing
This commit is contained in:
@@ -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');
|
||||
});
|
||||
Reference in New Issue
Block a user