mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 11:42:35 -06:00
25 lines
555 B
TypeScript
25 lines
555 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import OrgActionBar, { Props } from './OrgActionBar';
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
const props: Props = {
|
|
searchQuery: '',
|
|
setSearchQuery: jest.fn(),
|
|
target: '_blank',
|
|
linkButton: { href: 'some/url', title: 'test' },
|
|
};
|
|
|
|
Object.assign(props, propOverrides);
|
|
|
|
return shallow(<OrgActionBar {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|