mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tests
This commit is contained in:
24
public/app/features/plugins/PluginList.test.tsx
Normal file
24
public/app/features/plugins/PluginList.test.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import PluginList from './PluginList';
|
||||
import { getMockPlugins } from './__mocks__/pluginMocks';
|
||||
|
||||
const setup = (propOverrides?: object) => {
|
||||
const props = Object.assign(
|
||||
{
|
||||
plugins: getMockPlugins(5),
|
||||
layout: 'grid',
|
||||
},
|
||||
propOverrides
|
||||
);
|
||||
|
||||
return shallow(<PluginList {...props} />);
|
||||
};
|
||||
|
||||
describe('Render', () => {
|
||||
it('should render component', () => {
|
||||
const wrapper = setup();
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user