import { expect } from "chai" import { renderMarkdownLite, renderMarkdownLiteInline, } from "@/utils/markdown" describe("Render markdown", () => { const text = "# heading\n\ntest **bold** test *italic* test ~~strike~~ with `code`, html and https://example.com\nnew line\n\ntwo new lines and a list:\n- item 1\n- item 2\n\n>greentext\n\n---\n\nimage: \n\ncode block:\n```\nlet test\ntest = 1\n```" it("Render markdown lite", () => { const html = renderMarkdownLite(text) expect(html).to.equal('
# heading
test bold test italic test ~~strike~~ with code
, <span>html</span> and https://example.com
new line
two new lines and a list:
- item 1
- item 2
>greentext
---
image: !logo
code block:
let test\ntest = 1\n
')
})
it("Render markdown lite inline", () => {
const html = renderMarkdownLiteInline(text)
expect(html).to.equal('# headingcode
, <span>html</span> and https://example.comlet test test = 1
')
})
})