import React from 'react'; import { render } from 'enzyme'; import Drawer from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; describe('Drawer', () => { mountTest(Drawer); rtlTest(Drawer); it('render correctly', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('render top drawer', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('have a title', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('closable is false', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('destroyOnClose is true', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('className is test_drawer', () => { const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); it('style/drawerStyle/headerStyle/bodyStyle should work', () => { const style = { backgroundColor: '#08c', }; const wrapper = render( Here is content of Drawer , ); expect(wrapper).toMatchSnapshot(); }); });