2019-03-18 12:01:38 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { mount } from 'enzyme';
|
|
|
|
import Empty from '..';
|
2019-08-26 22:53:20 +08:00
|
|
|
import mountTest from '../../../tests/shared/mountTest';
|
2019-03-18 12:01:38 +08:00
|
|
|
|
|
|
|
describe('Empty', () => {
|
2019-08-26 22:53:20 +08:00
|
|
|
mountTest(Empty);
|
|
|
|
|
2019-03-18 12:01:38 +08:00
|
|
|
it('image size should change', () => {
|
2019-03-20 17:45:35 +08:00
|
|
|
const wrapper = mount(<Empty imageStyle={{ height: 20 }} />);
|
|
|
|
expect(wrapper.find('.ant-empty-image').props().style.height).toBe(20);
|
2019-03-18 12:01:38 +08:00
|
|
|
});
|
2019-07-15 23:24:20 +08:00
|
|
|
|
2019-07-16 22:32:36 +08:00
|
|
|
it('description can be false', () => {
|
|
|
|
const wrapper = mount(<Empty description={false} />);
|
2019-07-15 23:24:20 +08:00
|
|
|
expect(wrapper.find('.ant-empty-description').length).toBe(0);
|
|
|
|
});
|
2019-03-18 12:01:38 +08:00
|
|
|
});
|