"use strict";

var _markdownToHtml = _interopRequireDefault(require("./markdownToHtml"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

describe('Markdown to HTML', () => {
  test('convert markdown to html', () => {
    const md = 'paragraph _italic_ __bold__';
    const html = '<p>paragraph <em>italic</em> <strong>bold</strong></p>';
    expect((0, _markdownToHtml.default)(md)).toEqual(html);
  });
  test('convert table', () => {
    const md = `
| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |
`;
    expect((0, _markdownToHtml.default)(md).includes('table')).toBe(true);
    expect((0, _markdownToHtml.default)(md).includes('th')).toBe(true);
    expect((0, _markdownToHtml.default)(md).includes('tr')).toBe(true);
    expect((0, _markdownToHtml.default)(md).includes('td')).toBe(true);
  });
});