diff --git a/src/services/import/markdown.spec.ts b/src/services/import/markdown.spec.ts new file mode 100644 index 000000000..a09592210 --- /dev/null +++ b/src/services/import/markdown.spec.ts @@ -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`\ +

Hello

+

world

+

another one

+

Hello, world

+ `); + }); +});