chore(test): add test for markdown import

This commit is contained in:
Elian Doran 2025-01-10 22:03:08 +02:00
parent b1bb49c8e2
commit 36387deb0d
No known key found for this signature in database

View File

@ -0,0 +1,19 @@
import { trimIndentation } from "../../../spec/support/utils.js";
import markdownService from "./markdown.js";
describe("markdown", () => {
it("converts h1 heading", () => {
const result = markdownService.renderToHtml(trimIndentation`\
# Hello
## world
# another one
Hello, world
`, "title");
expect(result).toBe(trimIndentation`\
<h2>Hello</h2>
<h2>world</h2>
<h2>another one</h2>
<p>Hello, world</p>
`);
});
});