1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-18 09:21:37 +07:00
verdaccio-ui/src/components/Readme/Readme.spec.tsx
Juan Picado @jotadeveloper 67d7188cf5
feat: update material-ui@4.x (#123)
* chore: update material-ui@4.x

* test: update test for ActionBar and TestField

* chore: add types

* chore: update types

* test: update test for Author

* chore: fixed bunch of unit test

* chore: remove unused import

* chore: remove comments

* chore: replace shallow my mount

* chore: update git hooks

* chore: fix styles

* chore: update dependencies

* chore: remove types material-ui
2019-08-31 02:02:46 -07:00

17 lines
593 B
TypeScript

import React from 'react';
import { mount } from 'enzyme';
import Readme from './Readme';
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 = mount(<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();
});
});