grafana/public/app/features/datasources/settings/BasicSettings.test.tsx
2018-12-05 11:47:02 +01:00

23 lines
484 B
TypeScript

import React from 'react';
import { shallow } from 'enzyme';
import BasicSettings, { Props } from './BasicSettings';
const setup = () => {
const props: Props = {
dataSourceName: 'Graphite',
isDefault: false,
onDefaultChange: jest.fn(),
onNameChange: jest.fn(),
};
return shallow(<BasicSettings {...props} />);
};
describe('Render', () => {
it('should render component', () => {
const wrapper = setup();
expect(wrapper).toMatchSnapshot();
});
});