mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-31 12:12:28 +08: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>
|
||
|
`);
|
||
|
});
|
||
|
});
|