@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
23 lines • 988 B
JavaScript
// REACT
import * as React from 'react';
import * as renderer from 'react-test-renderer';
// VENDOR
import { ThemeProvider } from '@xstyled/styled-components';
// COMPONENT
import { RootTheme } from '../theme';
import { Menu } from './Menu.component';
import { Item } from './Item';
describe('Component: Menu', () => {
it('should match its snapshot and render items.', () => {
const subject = (React.createElement(ThemeProvider, { theme: RootTheme },
React.createElement(Menu, null,
React.createElement(Item, { path: "/" }, "Test Item")),
React.createElement(Menu, { size: "sm" },
React.createElement(Item, { path: "/" }, "Test Item")),
React.createElement(Menu, { size: "lg" },
React.createElement(Item, { path: "/" }, "Test Item"))));
const tree = renderer.create(subject).toJSON();
expect(tree).toMatchSnapshot();
});
});
//# sourceMappingURL=Menu.component.spec.js.map