1
0
mirror of https://github.com/SomboChea/ui synced 2024-12-28 23:24:26 +07:00
verdaccio-ui/test/unit/webui/components
Ayush Sharma 4a459df463 GitHub actions (#32)
* chore: fixes snapshots test

* chore: adds github actions, issue and feat templates

* chore: fixes eslint

* chore: remvoes circle ci and adds publish action

* chore: adds github-release automation using actions
2019-04-08 23:36:39 +02:00
..
__mocks__ chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
__snapshots__ GitHub actions (#32) 2019-04-08 23:36:39 +02:00
store chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
copyToClipBoard.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
footer.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
header.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
help.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
login.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
noitems.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
notfound.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
package.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
packagelist.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
readme.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00
search.spec.js chore: sync with verdaccio master 2019-04-04 21:23:40 +02:00

/**
 * Readme component
 */

import React from 'react';
import { shallow, mount } from 'enzyme';
import Readme from '../../../../src/webui/components/Readme/index';

describe('<Readme /> component', () => {
  test('should load the component in default state', () => {
    const wrapper = mount(<Readme description={"test"} />);
    expect(wrapper.html()).toMatchSnapshot();
  });

  test('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();
  });
});