@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).
31 lines (21 loc) • 751 B
JavaScript
import { DeliveryCounty } from './index';
import { expectToRenderCorrectly } from '../test-jest/helpers/expect-to-render-correctly';
expect.extend(expectToRenderCorrectly);
describe('DeliveryCounty', () => {
it('renders with default props', () => {
const props = {};
expect(DeliveryCounty).toRenderCorrectly(props);
});
it('renders with an error', () => {
const props = { hasError: true };
expect(DeliveryCounty).toRenderCorrectly(props);
});
it('renders with a custom value', () => {
const props = { value: 'foobar' };
expect(DeliveryCounty).toRenderCorrectly(props);
});
it('renders with a disabled input element', () => {
const props = { isDisabled: true };
expect(DeliveryCounty).toRenderCorrectly(props);
});
});