BasicSettings.test.tsx 485 B

1234567891011121314151617181920212223
  1. import { shallow } from 'enzyme';
  2. import React from 'react';
  3. import BasicSettings, { Props } from './BasicSettings';
  4. const setup = () => {
  5. const props: Props = {
  6. dataSourceName: 'Graphite',
  7. isDefault: false,
  8. onDefaultChange: jest.fn(),
  9. onNameChange: jest.fn(),
  10. };
  11. return shallow(<BasicSettings {...props} />);
  12. };
  13. describe('Render', () => {
  14. it('should render component', () => {
  15. const wrapper = setup();
  16. expect(wrapper).toMatchSnapshot();
  17. });
  18. });