mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-02 14:12:42 +08:00
chore(test): add test for markdown import
This commit is contained in:
parent
b1bb49c8e2
commit
36387deb0d
19
src/services/import/markdown.spec.ts
Normal file
19
src/services/import/markdown.spec.ts
Normal 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>
|
||||
`);
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user