Files
grafana/public/app/core/components/OrgActionBar/OrgActionBar.test.tsx
Peter Holmberg cc1e22925f snaps
2018-10-02 11:11:36 +02:00

24 lines
533 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(),
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();
});
});