forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
558 B
24 lines
558 B
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import PageActionBar, { Props } from './PageActionBar';
|
|
|
|
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(<PageActionBar {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|
|
|