mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
24 lines
633 B
TypeScript
24 lines
633 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import { DataSourcesActionBar, Props } from './DataSourcesActionBar';
|
|
import { LayoutModes } from '../../core/components/LayoutSelector/LayoutSelector';
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
const props: Props = {
|
|
layoutMode: LayoutModes.Grid,
|
|
searchQuery: '',
|
|
setDataSourcesLayoutMode: jest.fn(),
|
|
setDataSourcesSearchQuery: jest.fn(),
|
|
};
|
|
|
|
return shallow(<DataSourcesActionBar {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|