pluginIcon.spec.tsx 719 B

123456789101112131415161718192021
  1. /* eslint-disable jest/no-disabled-tests */
  2. import {render} from 'sentry-test/reactTestingLibrary';
  3. import PluginIcon from 'sentry/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/logos/logo-default.svg', () => 'default', {});
  7. jest.mock('images/logos/logo-github.svg', () => 'github', {});
  8. describe('PluginIcon', function () {
  9. it('renders', function () {
  10. render(<PluginIcon pluginId="github" size={20} />);
  11. });
  12. // doesn't work because of the above comment
  13. it.skip('renders with default icon with invalid plugin id', function () {
  14. render(<PluginIcon pluginId="invalid" size={20} />);
  15. });
  16. });