mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
26 lines
543 B
TypeScript
26 lines
543 B
TypeScript
|
import React from 'react';
|
|||
|
import { shallow } from 'enzyme';
|
|||
|
import { ApiKeysAddedModal, Props } from './ApiKeysAddedModal';
|
|||
|
|
|||
|
const setup = (propOverrides?: object) => {
|
|||
|
const props: Props = {
|
|||
|
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();
|
|||
|
});
|
|||
|
});
|