import { mount } from '@vue/test-utils'; import List from '..'; import Icon from '../../icon'; describe('List', () => { it('renders empty loading', () => { const loading = { spinning: true, }; const wrapper = mount({ render() { return } />; }, }); expect(wrapper.findAll('.ant-list-empty-text')).toHaveLength(0); }); it('renders object loading', () => { const loading = { spinning: true, }; const wrapper = mount({ render() { return } />; }, }); expect(wrapper.findAll('.ant-spin-spinning')).toHaveLength(1); }); it('renders object loading with indicator', () => { const wrapper = mount({ render() { return ( , }} dataSource={[1]} renderItem={() => } /> ); }, }); expect(wrapper.findAll('.anticon-loading')).toHaveLength(1); }); });