mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
9d265996f9
* refactor: Moved Search to Header feat: added TxtField. WIP refactor: replaced downshift by react-autosuggest refactor: moved search's state refactor: introduced weight 300 & 500 refactor: changed container css margin refactor: made it more abstract refactor: replaced name by label. changed css refactor: removed aria refactor: removed margin fix: fixed flow types fix: fixed tags overlapping fix: fixed search. WIP refactor: removed useless library and added rect-router refactor: fixed tests * chore: remove tpm file * feat: added component Loading feat: added component Layout refactor: changed css refactor: added md prop refactor: moved Header back to App * chore: fix flow * fix: update snapshot fix: fixed componentDidMount parameter refactor: added onKeyDown event fix: fixed bad request refactor: renamed interfaces files refactor: refactor: logic display results refactor: changed minor things fix: fixed tests fix: fixed tests |
||
---|---|---|
.. | ||
__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 } from 'enzyme'; import Readme from '../../../../src/webui/components/Readme/index'; console.error = jest.fn(); describe('<Readme /> component', () => { it('should give error for the required fields', () => { shallow(<Readme />); expect(console.error).toBeCalled(); }); it('should dangerously set html', () => { const props = { readMe: '<h1>This is a test string</h1>' }; const wrapper = shallow(<Readme {...props} />); expect(wrapper.html()).toEqual( '<div class="markdown-body"><h1>This is a test string</h1></div>' ); expect(wrapper.html()).toMatchSnapshot(); }); });