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