mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
more tests
This commit is contained in:
19
nextjs/src/models/local/tests/markdown/pageMarkdown.test.ts
Normal file
19
nextjs/src/models/local/tests/markdown/pageMarkdown.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user