Sha256: f102a0602d5682c77a618464f7c2d668f2f0f6a0a6a6d0f5660bf2844367bba5
Contents?: true
Size: 775 Bytes
Versions: 191
Compression:
Stored size: 775 Bytes
Contents
import React from 'react'; import { mount } from 'enzyme'; import toJson from 'enzyme-to-json'; import RepositoryTypeIcon from '../RepositoryTypeIcon'; describe('RepositoryTypeIcon component', () => { const getBaseProps = () => ({ id: 123, type: 'unknown-type', }); describe('rendering', () => { test('it should get rendered correctly', () => { const component = mount(<RepositoryTypeIcon {...getBaseProps()} />); expect(toJson(component)).toMatchSnapshot(); }); test('it should get rendered correctly when type is provided', () => { const props = getBaseProps(); props.type = 'yum'; const component = mount(<RepositoryTypeIcon {...props} />); expect(toJson(component)).toMatchSnapshot(); }); }); });
Version data entries
191 entries across 191 versions & 1 rubygems