riya_business_travel_8.0.0_.../public/app/features/api-keys/ApiKeysAddedModal.test.tsx
venbatechnologies@gmail.com 565484c22d Modified initial commit
2021-07-05 14:17:23 +05:30

27 lines
569 B
TypeScript

import React from 'react';
import { shallow } from 'enzyme';
import { ApiKeysAddedModal, Props } from './ApiKeysAddedModal';
const setup = (propOverrides?: object) => {
const props: Props = {
onDismiss: jest.fn(),
apiKey: 'api key test',
rootPath: 'test/path',
};
Object.assign(props, propOverrides);
const wrapper = shallow(<ApiKeysAddedModal {...props} />);
return {
wrapper,
};
};
describe('Render', () => {
it('should render component', () => {
const { wrapper } = setup();
expect(wrapper).toMatchSnapshot();
});
});