UNPKG

@retailmenot/anchor

Version:

A React UI Library by RetailMeNot

29 lines 1.19 kB
// VENDOR import * as React from 'react'; import * as renderer from 'react-test-renderer'; import { ThemeProvider } from '@xstyled/styled-components'; // ANCHOR import { RootTheme } from '../../theme'; // COMPONENT import { Radio } from './Radio.component'; describe('Component: Radio', () => { it('should be defined', () => { const subject = (React.createElement(ThemeProvider, { theme: RootTheme }, React.createElement(Radio, null))); const tree = renderer.create(subject).toJSON(); expect(tree).toMatchSnapshot(); }); it('should be disableable', () => { const subject = (React.createElement(ThemeProvider, { theme: RootTheme }, React.createElement(Radio, { disabled: true }))); const tree = renderer.create(subject).toJSON(); expect(tree).toMatchSnapshot(); }); it('can be checked', () => { const subject = (React.createElement(ThemeProvider, { theme: RootTheme }, React.createElement(Radio, { checked: true }))); const tree = renderer.create(subject).toJSON(); expect(tree).toMatchSnapshot(); }); }); //# sourceMappingURL=Radio.component.spec.js.map