OrgActionBar.test.tsx 555 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import OrgActionBar, { Props } from './OrgActionBar';
  4. const setup = (propOverrides?: object) => {
  5. const props: Props = {
  6. searchQuery: '',
  7. setSearchQuery: jest.fn(),
  8. target: '_blank',
  9. linkButton: { href: 'some/url', title: 'test' },
  10. };
  11. Object.assign(props, propOverrides);
  12. return shallow(<OrgActionBar {...props} />);
  13. };
  14. describe('Render', () => {
  15. it('should render component', () => {
  16. const wrapper = setup();
  17. expect(wrapper).toMatchSnapshot();
  18. });
  19. });