1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-18 17:29:43 +07:00
verdaccio-ui/test/unit/components
Juan Picado @jotadeveloper 11f4819e3c
chore: remove snapshot
2019-06-03 21:09:48 +02:00
..
__mocks__ chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
__snapshots__ chore: remove snapshot 2019-06-03 21:09:48 +02:00
store chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
copyToClipBoard.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
footer.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
header.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
help.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
login.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
noitems.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
notfound.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
package.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
packagelist.spec.js chore: remove snapshot 2019-06-03 21:09:48 +02:00
readme.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +02:00
search.spec.js chore: relocate unit test (#39) 2019-05-01 21:02:46 +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();
  });
});