UNPKG

@financial-times/n-conversion-forms

Version:

Containing jsx components and styles for forms included on Accounts and Acquisition apps (next-signup, next-profile, next-retention, etc).

25 lines (17 loc) 646 B
import { DecisionMaker } from './index'; import { expectToRenderCorrectly } from '../test-jest/helpers/expect-to-render-correctly'; expect.extend(expectToRenderCorrectly); describe('DecisionMaker', () => { it('renders with default props', () => { const props = { value: 'yes' }; expect(DecisionMaker).toRenderCorrectly(props); }); it('renders with an error', () => { const props = { value: 'yes', hasError: true }; expect(DecisionMaker).toRenderCorrectly(props); }); it("renders with 'no' as default state for radio buttons", () => { const props = { value: 'no' }; expect(DecisionMaker).toRenderCorrectly(props); }); });