mirror of
https://github.com/outline/outline.git
synced 2025-12-30 15:30:12 -06:00
19 lines
456 B
TypeScript
19 lines
456 B
TypeScript
import MarkdownHelper from "./MarkdownHelper";
|
|
|
|
describe("#MarkdownHelper", () => {
|
|
it("should serialize title and text", () => {
|
|
expect(MarkdownHelper.toMarkdown({ title: "Title", text: "Test" })).toEqual(
|
|
"# Title\n\nTest"
|
|
);
|
|
});
|
|
|
|
it("should trim backslashes", () => {
|
|
expect(
|
|
MarkdownHelper.toMarkdown({
|
|
title: "Title",
|
|
text: "One\n\\\nTest\n\\",
|
|
})
|
|
).toEqual("# Title\n\nOne\n\nTest");
|
|
});
|
|
});
|