import convertContentToHtml from "../lib/convertContentToHtml"; describe('convert md string to html', () => { it('should return a h1 and a h2', () => { let md = ''; md += '# Title \n'; md += '## Hello'; const html = convertContentToHtml(md); let expected = ''; expected += '

Title

\n' expected += '

Hello

\n'; expect(html).toBe(expected); }); it('should return a p and li', () => { let md = ''; md += 'Supermarket list:\n'; md += '* 3 Apples\n'; md += '* 2 Orange'; const html = convertContentToHtml(md); let expected = ''; expected += '

Supermarket list:

\n' expected += '\n'; expect(html).toBe(expected); }); });