0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/test/unit/webui/components
Priscila 9f6106cfe9 Package Refactor (#1145)
* chore: fix unit test, forgotten line on merge

chore: add node 11 to circleci (#1153)

chore: fix the use of Node 11 in CircleCI (#1154)

refactor: added css in js, new design, added types

feat: added Tag component

refactor: added modifiers

refactor: replaced by polished ellipsis

refactor: added types, new design and css in js

refactor: removed ul. it needs refactor

refactor: changed media queries

refactor: changed icon height

refactor: changed Header media queries

refactor: removed margin top

refactor: updated snapshots

refactor: removed unnecessary format author

refactor: added license icon & changed size

refactor: changed media queries

refactor: added icon size

refactor: changed media queries

refactor: updated snap

refactor: replaced Description by Details

refactor: updated tests

refactor: fixed modifiers type

feat: created missed types

fix: fixed types

fix: fixed prop type

fix: fixed undefined prop

refactor: replaced label by name

refactor: updated snap

refactor: moved polished to dev

refactor: changed formatAuthor and pkg author type

fix: removed incorrect meta's type

refactor: removed polished

refactor: added spacing & ellipsis mixin

refactor: added modifier type

refactor: changed datetime format

refactor: updated snapshots

refactor: rreplaced polished by mixins func

* refactor: updated styled

* fix: added missed semicolon

* refactor: updated media

* refactor: updated tests

* refactor: organized modifiers

* refactor: removed unused imports

* refactor: design adjusts

* refactor: updated snapshot

* refactor: changed minor things

* refactor: updated snapshots

* refactor: commented tests. fix later
2018-12-13 19:05:47 +01:00
..
__mocks__ fix: login without reload (#678) (#679) (#914) 2018-08-20 16:29:47 +02:00
__snapshots__ Package Refactor (#1145) 2018-12-13 19:05:47 +01:00
PackageSidebar Merge remote-tracking branch 'origin/master' into 4.x 2018-12-06 23:04:42 +01: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: adds unit test for <Search /> (#1137) 2018-11-26 20:28:59 +01:00
header.spec.js Refactor: Moved Search to Header (#1064) 2018-10-27 21:19:45 +02:00
help.spec.js refactor: <Help /> component (#1118) 2018-11-16 22:29:56 +01: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 Package Refactor (#1145) 2018-12-13 19:05:47 +01:00
packagedetail.spec.js refactor: <Package /> , <Footer /> and package sidebar code refactoring 2018-07-22 21:22:51 +02:00
packagelist.spec.js Package Refactor (#1145) 2018-12-13 19:05:47 +01:00
readme.spec.js refactor: added flow type checking (#1099) 2018-10-31 12:54:26 +08:00
search.spec.js Package Refactor (#1145) 2018-12-13 19:05:47 +01: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();
  });
});