import React from 'react';
import { shallow, mount } from 'enzyme';
import H3 from './';
import 'jest-styled-components';
describe('H3 Component', () => {
test('renders', () => {
const wrapper = shallow(
);
expect(wrapper).toMatchSnapshot();
});
test('the H3 text is equal to `NEW ARRIVALS`', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper.text()).toEqual('NEW ARRIVALS');
});
test('the font size is equal to `24px` on mobile', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper).toHaveStyleRule('font-size', '24px');
});
test('the font size is equal to `32px` on desktop', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper).toHaveStyleRule('font-size', '32px', { 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 Sans Condensed, sans-serif`', () => {
const wrapper = mount(NEW ARRIVALS
);
expect(wrapper).toHaveStyleRule('font-family', `'Rapha Sans Condensed',sans-serif`);
});
});