mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
9869edfb38
refactor: added types, css in js styles, new comp refactor: updated emotion fix: fixed import refactor: updated image path and type refactor: minified svg refactor: now it's stateless refactor: updated snap & removed click test feat: added capitalize helper refactor: changed medium refactor: added title and image option refactor: added missed && refactor: updated snap fix: fixed types fix: fixed types fix: added flow type ignore line fix: fixed index map refactor: updated icons refactor: removed unnecessary capitalize func refactor: removed empty lines fix: fixed svg 404 |
||
---|---|---|
.. | ||
__mocks__ | ||
__snapshots__ | ||
PackageSidebar | ||
store | ||
copyToClipBoard.spec.js | ||
footer.spec.js | ||
header.spec.js | ||
help.spec.js | ||
login.spec.js | ||
noitems.spec.js | ||
notfound.spec.js | ||
package.spec.js | ||
packagedetail.spec.js | ||
packagelist.spec.js | ||
readme.spec.js |
/** * Readme component */ import React from 'react'; import { shallow, mount } from 'enzyme'; import Readme from '../../../../src/webui/components/Readme/index'; describe('<Readme /> component', () => { it('should load the component in default state', () => { const wrapper = mount(<Readme description='test' />); expect(wrapper.html()).toMatchSnapshot(); }); it('should dangerously set html', () => { const wrapper = shallow(<Readme description='<h1>This is a test string</h1>' />); expect(wrapper.html()).toEqual( '<div class="markdown-body"><h1>This is a test string</h1></div>' ); expect(wrapper.html()).toMatchSnapshot(); }); });