mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
26 lines
619 B
TypeScript
26 lines
619 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import PluginList from './PluginList';
|
|
import { getMockPlugins } from './__mocks__/pluginMocks';
|
|
import { LayoutModes } from '../../core/components/LayoutSelector/LayoutSelector';
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
const props = Object.assign(
|
|
{
|
|
plugins: getMockPlugins(5),
|
|
layoutMode: LayoutModes.Grid,
|
|
},
|
|
propOverrides
|
|
);
|
|
|
|
return shallow(<PluginList {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|