mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 17:31:43 +08:00
26 lines
647 B
JavaScript
26 lines
647 B
JavaScript
|
import { mount } from '@vue/test-utils';
|
||
|
import Empty from '..';
|
||
|
import mountTest from '../../../tests/shared/mountTest';
|
||
|
|
||
|
describe('Empty', () => {
|
||
|
mountTest(Empty);
|
||
|
|
||
|
it('image size should change', () => {
|
||
|
const wrapper = mount({
|
||
|
render() {
|
||
|
return <Empty imageStyle={{ height: '20px' }} />;
|
||
|
},
|
||
|
});
|
||
|
expect(wrapper.find('.ant-empty-image').element.style.height).toBe('20px');
|
||
|
});
|
||
|
|
||
|
it('description can be false', () => {
|
||
|
const wrapper = mount({
|
||
|
render() {
|
||
|
return <Empty description={false} />;
|
||
|
},
|
||
|
});
|
||
|
expect(wrapper.findAll('.ant-empty-description').length).toBe(0);
|
||
|
});
|
||
|
});
|