Files
grafana/packages/grafana-ui/src/components/FormGroup/FormField.test.tsx
2019-01-16 13:46:57 +00:00

27 lines
527 B
TypeScript

import React from 'react';
import { shallow } from 'enzyme';
import { FormField, Props } from './FormField';
const setup = (propOverrides?: object) => {
const props: Props = {
label: 'Test',
labelWidth: 11,
inputProps: {
value: 10,
onChange: jest.fn(),
},
};
Object.assign(props, propOverrides);
return shallow(<FormField {...props} />);
};
describe('Render', () => {
it('should render component', () => {
const wrapper = setup();
expect(wrapper).toMatchSnapshot();
});
});