grafana/public/app/features/plugins/PluginList.test.tsx

26 lines
581 B
TypeScript
Raw Normal View History

2018-09-26 08:12:06 -05:00
import React from 'react';
import { shallow } from 'enzyme';
import PluginList from './PluginList';
import { getMockPlugins } from './__mocks__/pluginMocks';
import { LayoutModes } from '@grafana/data';
2018-09-26 08:12:06 -05:00
const setup = (propOverrides?: object) => {
const props = Object.assign(
{
plugins: getMockPlugins(5),
2018-09-27 05:15:41 -05:00
layoutMode: LayoutModes.Grid,
2018-09-26 08:12:06 -05:00
},
propOverrides
);
return shallow(<PluginList {...props} />);
};
describe('Render', () => {
it('should render component', () => {
const wrapper = setup();
expect(wrapper).toMatchSnapshot();
});
});