@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
23 lines • 839 B
JavaScript
// VENDOR
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import { shallow, mount } from 'enzyme';
import { ThemeProvider } from '@xstyled/styled-components';
// ANCHOR
import { RootTheme } from '../../theme';
import { Title } from './Title.component';
// TEST SETUP
const subject = (React.createElement(ThemeProvider, { theme: RootTheme },
React.createElement(Title, null, "Title")));
const wrapper = mount(subject);
const component = shallow(subject);
describe('Component: Title', () => {
it('should be defined', () => {
expect(subject).toBeDefined();
expect(wrapper).toBeDefined();
expect(component).toBeDefined();
const tree = renderer.create(subject).toJSON();
expect(tree).toMatchSnapshot();
});
});
//# sourceMappingURL=Title.component.spec.js.map