OrgActionBar.test.tsx 533 B

1234567891011121314151617181920212223
  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. linkButton: { href: 'some/url', title: 'test' },
  9. };
  10. Object.assign(props, propOverrides);
  11. return shallow(<OrgActionBar {...props} />);
  12. };
  13. describe('Render', () => {
  14. it('should render component', () => {
  15. const wrapper = setup();
  16. expect(wrapper).toMatchSnapshot();
  17. });
  18. });