ApiKeysAddedModal.test.tsx 543 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import { ApiKeysAddedModal, Props } from './ApiKeysAddedModal';
  4. const setup = (propOverrides?: object) => {
  5. const props: Props = {
  6. apiKey: 'api key test',
  7. rootPath: 'test/path',
  8. };
  9. Object.assign(props, propOverrides);
  10. const wrapper = shallow(<ApiKeysAddedModal {...props} />);
  11. return {
  12. wrapper,
  13. };
  14. };
  15. describe('Render', () => {
  16. it('should render component', () => {
  17. const { wrapper } = setup();
  18. expect(wrapper).toMatchSnapshot();
  19. });
  20. });