mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 15:04:27 +07:00
c9fb3c4c50
* fix: search suggestion container height * fix: updates snapshot |
||
---|---|---|
.. | ||
__mocks__ | ||
__snapshots__ | ||
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 | ||
packagelist.spec.js | ||
readme.spec.js | ||
search.spec.js |
/** * 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(); }); });