more tests

This commit is contained in:
2024-08-21 15:04:28 -06:00
parent 0d79299072
commit 7bb15126b6
4 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { describe, it, expect } from "vitest";
import { LocalCoursePage } from "../../page/localCoursePage";
import { pageMarkdown } from "../../page/pageMarkdown";
describe("PageMarkdownTests", () => {
it("can parse page", () => {
const page: LocalCoursePage = {
name: "test title",
text: "test text content",
dueAt: new Date().toISOString(),
};
const pageMarkdownString = pageMarkdown.toMarkdown(page);
const parsedPage = pageMarkdown.parseMarkdown(pageMarkdownString);
expect(parsedPage).toEqual(page);
});
});