import React from 'react'; import { shallow, mount } from 'enzyme'; import H4 from './'; import 'jest-styled-components'; describe('H4 Component', () => { test('renders', () => { const wrapper = shallow(

); expect(wrapper).toMatchSnapshot(); }); test('the H4 text is equal to `NEW ARRIVALS`', () => { const wrapper = mount(

NEW ARRIVALS

); expect(wrapper.text()).toEqual('NEW ARRIVALS'); }); test('the font size is equal to `18px` on mobile', () => { const wrapper = mount(

NEW ARRIVALS

); expect(wrapper).toHaveStyleRule('font-size', '18px'); }); test('the font size is equal to `24px` on desktop', () => { const wrapper = mount(

NEW ARRIVALS

); expect(wrapper).toHaveStyleRule('font-size', '24px', { media: '(min-width: 48em)' }); }); test('the font weight is equal to `600`', () => { const wrapper = mount(

NEW ARRIVALS

); expect(wrapper).toHaveStyleRule('font-weight', '600'); }); test('the font family is equal to `Rapha Serif Text, serif`', () => { const wrapper = mount(

NEW ARRIVALS

); expect(wrapper).toHaveStyleRule('font-family', `'Rapha Sans Condensed',sans-serif`); }); });