mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
tests passing
This commit is contained in:
@@ -1,18 +1,17 @@
|
|||||||
import { describe, it, expect } from "vitest";
|
import { describe, it, expect } from "vitest";
|
||||||
import { LocalCoursePage } from "../page/localCoursePage";
|
import { LocalCoursePage, localPageMarkdownUtils } from "../page/localCoursePage";
|
||||||
import { pageMarkdownUtils } from "../page/pageMarkdownUtils";
|
|
||||||
|
|
||||||
describe("PageMarkdownTests", () => {
|
describe("PageMarkdownTests", () => {
|
||||||
it("can parse page", () => {
|
it("can parse page", () => {
|
||||||
const page: LocalCoursePage = {
|
const page: LocalCoursePage = {
|
||||||
name: "test title",
|
name: "test title",
|
||||||
text: "test text content",
|
text: "test text content",
|
||||||
dueAt: new Date().toISOString(),
|
dueAt: "09/07/2024 23:59:00",
|
||||||
};
|
};
|
||||||
|
|
||||||
const pageMarkdownString = pageMarkdownUtils.toMarkdown(page);
|
const pageMarkdownString = localPageMarkdownUtils.toMarkdown(page);
|
||||||
|
|
||||||
const parsedPage = pageMarkdownUtils.parseMarkdown(pageMarkdownString);
|
const parsedPage = localPageMarkdownUtils.parseMarkdown(pageMarkdownString);
|
||||||
|
|
||||||
expect(parsedPage).toEqual(page);
|
expect(parsedPage).toEqual(page);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user