mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
20 lines
551 B
TypeScript
20 lines
551 B
TypeScript
|
|
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>
|
||
|
|
`);
|
||
|
|
});
|
||
|
|
});
|