import { render, mount } from 'enzyme'; import React from 'react'; import ProSkeleton from '../../packages/skeleton/src/index'; describe('skeleton', () => { it('🥩 list base use', async () => { const html = render(); expect(html).toMatchSnapshot(); }); it('🥩 descriptions base use', async () => { const html = render(); expect(html).toMatchSnapshot(); }); it('🥩 result base use', async () => { const html = render(); expect(html).toMatchSnapshot(); }); it('🥩 descriptions api use', async () => { const wrapper = mount(); expect(wrapper.render()).toMatchSnapshot(); wrapper.setProps({ table: false, }); expect(wrapper.render()).toMatchSnapshot(); }); it('🥩 list api use', async () => { const wrapper = mount( , ); expect(wrapper.render()).toMatchSnapshot(); wrapper.setProps({ list: false, statistic: false, }); expect(wrapper.render()).toMatchSnapshot(); }); it('🥩 statistic=1,span=16', async () => { const wrapper = mount( , ); expect(wrapper.render()).toMatchSnapshot(); }); });