@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
23 lines • 924 B
JavaScript
// REACT
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import { ThemeProvider } from '@xstyled/styled-components';
// COMPONENT
import { RootTheme } from '../../theme';
import { Modal } from '..';
const { Close } = Modal;
describe('Component: Modal.Close', () => {
it('should render', () => {
const subject = (React.createElement(ThemeProvider, { theme: RootTheme },
React.createElement(Close, null)));
const tree = renderer.create(subject).toJSON();
expect(tree).toMatchSnapshot();
});
it('should match snapshot with alignment set', () => {
const subject = (React.createElement(ThemeProvider, { theme: RootTheme },
React.createElement(Close, { align: "left" })));
const tree = renderer.create(subject).toJSON();
expect(tree).toMatchSnapshot();
});
});
//# sourceMappingURL=Close.component.spec.js.map