import React from 'react'; import { shallow } from 'enzyme'; import { Container } from '../'; describe('Container', () => { it('should render .container markup', () => { const wrapper = shallow(); expect(wrapper.html()).toBe('
'); }); it('should render .container-fluid markup', () => { const wrapper = shallow(); expect(wrapper.html()).toBe('
'); }); it('should render children', () => { const wrapper = shallow(Children); expect(wrapper.html()).toBe('
Children
'); }); it('should pass additional classNames', () => { const wrapper = shallow(); expect(wrapper.hasClass('extra')).toBe(true); expect(wrapper.hasClass('container')).toBe(true); }); it('should render custom tag', () => { const wrapper = shallow(Yo!); expect(wrapper.text()).toBe('Yo!'); expect(wrapper.hasClass('container')).toBe(true); expect(wrapper.type()).toBe('main'); }); it('should render responsive breakpoints with string fluid props', () => { const wrapper = shallow(); expect(wrapper.hasClass('container')).toBe(false); expect(wrapper.hasClass('container-md')).toBe(true); }); });