UNPKG

@momentum-ui/react

Version:

Cisco Momentum UI framework for ReactJs applications

23 lines (17 loc) 680 B
import React from 'react'; import { shallow } from 'enzyme'; import { SocialList } from '@momentum-ui/react'; describe('<SocialList />', () => { it('should render a SocialList', () => { const container = shallow(<SocialList />); expect(container).toMatchSnapshot(); }); it('should render null if children prop is not set', () => { const container = shallow(<SocialList />); expect(container.instance().props.children).toEqual(null); }); it('should render children if children prop is set', () => { const container = shallow(<SocialList>social list</SocialList>); expect(container.instance().props.children).toEqual('social list'); }); });