feat(Empty): description prop support undefined/null value to remove description node

This commit is contained in:
wadezhan 2019-07-16 22:11:30 +08:00
parent 5df766fb5b
commit 9d437d39f9

View File

@ -8,7 +8,7 @@ describe('Empty', () => {
expect(wrapper.find('.ant-empty-image').props().style.height).toBe(20);
});
it('description can be false', () => {
it('description can be undefined or null', () => {
const wrapper = mount(<Empty description={undefined} />);
expect(wrapper.find('.ant-empty-description').length).toBe(0);
});