pluginIcon.spec.jsx 752 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import PluginIcon from 'app/plugins/components/pluginIcon';
  4. // For some reason jest only respects the last mocked, so we can't test
  5. // two different images here
  6. // jest.mock('images/integrations/integration-default.png', () => 'default', {});
  7. jest.mock('images/integrations/github-logo.png', () => 'github', {});
  8. describe('PluginIcon', function() {
  9. it('renders', function() {
  10. let wrapper = shallow(<PluginIcon pluginId="github" size={20} />);
  11. expect(wrapper).toMatchSnapshot();
  12. });
  13. it.skip('renders with default icon with invalid plugin id', function() {
  14. let wrapper = shallow(<PluginIcon pluginId="invalid" size={20} />);
  15. expect(wrapper).toMatchSnapshot();
  16. });
  17. });