import React from 'react';
import { shallow, mount } from 'enzyme';
import H5 from './';
import 'jest-styled-components';
describe('H5 Component', () => {
test('renders', () => {
const wrapper = shallow(
);
expect(wrapper).toMatchSnapshot();
});
test('the H5 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 `400`', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper).toHaveStyleRule('font-weight', '400');
});
test('the font family is equal to `Rapha Sans Condensed, sans-serif`', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper).toHaveStyleRule('font-family', `'Rapha Sans Condensed',sans-serif`);
});
});