grafana/public/app/features/datasources/settings/BasicSettings.test.tsx

23 lines
484 B
TypeScript
Raw Normal View History

2018-11-01 07:45:52 -05:00
import React from 'react';
import { shallow } from 'enzyme';
import BasicSettings, { Props } from './BasicSettings';
const setup = () => {
const props: Props = {
dataSourceName: 'Graphite',
2018-12-05 04:47:02 -06:00
isDefault: false,
onDefaultChange: jest.fn(),
onNameChange: jest.fn(),
2018-11-01 07:45:52 -05:00
};
return shallow(<BasicSettings {...props} />);
};
describe('Render', () => {
it('should render component', () => {
const wrapper = setup();
expect(wrapper).toMatchSnapshot();
});
});