Files
talk/client/talk-plugin-infobox/__tests__/markdown.spec.js
T
2017-07-20 11:52:36 -03:00

21 lines
610 B
JavaScript

import React from 'react';
import {shallow} from 'enzyme';
import {expect} from 'chai';
import Markdown from '../Markdown';
const render = (props) => shallow(<Markdown {...props} />);
describe('Markdown', () => {
it('should convert Markdown to html', () => {
const wrapper = render({content: '*test*'});
const html = wrapper.html();
expect(html).to.contain('<em>');
});
it('should set target="_parent" for links', () => {
const wrapper = render({content: '[link](https://coralproject.net)'});
const html = wrapper.html();
expect(html).to.contain('target="_parent"');
});
});