This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
2016-09-16 07:06:33 +00:00
|
|
|
/* eslint-disable */
|
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import DocumentHtml from './DocumentHtml';
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
|
|
|
|
const testHtml = `
|
|
|
|
<h1>test document</h1>
|
|
|
|
<p>Hello! <a href="/internal">internal link</a></p>
|
|
|
|
<p>Aliens <a href="/external">external link</a></p>
|
|
|
|
`;
|
|
|
|
|
|
|
|
test('renders', () => {
|
2017-05-10 06:14:24 +00:00
|
|
|
const wrapper = shallow(<DocumentHtml html={testHtml} />);
|
2016-09-16 07:06:33 +00:00
|
|
|
expect(wrapper.find('.document').length).toBe(1);
|
|
|
|
});
|