Add more tests for markdown renderer
This commit is contained in:
parent
3cba9c7714
commit
2177fb4948
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@ import { renderMarkdownLite } from "@/utils/markdown"
|
||||||
|
|
||||||
describe("Render markdown", () => {
|
describe("Render markdown", () => {
|
||||||
it("Render markdown lite", () => {
|
it("Render markdown lite", () => {
|
||||||
const text = "test **bold** ~~strike~~ with `code`, <span>html</span> and https://example.com\nand a new line"
|
const text = "test **bold** test *italic* test ~~strike~~ with `code`, <span>html</span> and https://example.com\nnew line\n\ntwo new lines and a list:\n- item 1\n- item 2\n\ncode block:\n```\nlet test\ntest = 1\n```"
|
||||||
const html = renderMarkdownLite(text)
|
const html = renderMarkdownLite(text)
|
||||||
expect(html).to.equal('test <strong>bold</strong> ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com" target="_blank" rel="noopener">https://example.com</a><br>and a new line')
|
expect(html).to.equal('test <strong>bold</strong> test <em>italic</em> test ~~strike~~ with <code>code</code>, <span>html</span> and <a href="https://example.com" target="_blank" rel="noopener">https://example.com</a><br>new line<br><br>two new lines and a list:<br>- item 1<br>- item 2<br><br>code block:<br><code>let test test = 1</code>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue