1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/test/unit/webui/components
2018-10-31 20:42:43 +08:00
..
__mocks__ fix: login without reload (#678) (#679) (#914) 2018-08-20 16:29:47 +02:00
__snapshots__ refactor: added flow and css in JS in NotFound (#1098) 2018-10-31 20:42:43 +08:00
PackageSidebar Header Section Refactor - New UI (#1006) 2018-09-24 22:04:37 +02:00
store fix: login without reload (#678) (#679) (#914) 2018-08-20 16:29:47 +02:00
copyToClipBoard.spec.js refactor: add space in curly braces -> object-curly-spacing (#1035) 2018-10-01 07:06:30 +02:00
footer.spec.js refactor: <Package /> , <Footer /> and package sidebar code refactoring 2018-07-22 21:22:51 +02:00
header.spec.js Refactor: Moved Search to Header (#1064) 2018-10-27 21:19:45 +02:00
help.spec.js refactor: removes un-necessary 'src' from webui path 2018-07-17 22:03:06 +02:00
login.spec.js refactor: add space in curly braces -> object-curly-spacing (#1035) 2018-10-01 07:06:30 +02:00
noitems.spec.js refactor: added flow and css in js (#1100) 2018-10-31 13:00:59 +08:00
notfound.spec.js refactor: added flow and css in JS in NotFound (#1098) 2018-10-31 20:42:43 +08:00
package.spec.js feat: replaced element-react by Material-UI (#950) (#985) 2018-09-06 21:26:54 +02:00
packagedetail.spec.js refactor: <Package /> , <Footer /> and package sidebar code refactoring 2018-07-22 21:22:51 +02:00
packagelist.spec.js Refactor: Moved Search to Header (#1064) 2018-10-27 21:19:45 +02:00
readme.spec.js refactor: added flow type checking (#1099) 2018-10-31 12:54:26 +08:00

/**
 * 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();
  });
});