AddPanelWidget.test.tsx 558 B

1234567891011121314151617181920212223
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import { AddPanelWidget, Props } from './AddPanelWidget';
  4. import { DashboardModel, PanelModel } from '../../state';
  5. const setup = (propOverrides?: object) => {
  6. const props: Props = {
  7. dashboard: {} as DashboardModel,
  8. panel: {} as PanelModel,
  9. };
  10. Object.assign(props, propOverrides);
  11. return shallow(<AddPanelWidget {...props} />);
  12. };
  13. describe('Render', () => {
  14. it('should render component', () => {
  15. const wrapper = setup();
  16. expect(wrapper).toMatchSnapshot();
  17. });
  18. });