running smooth again

This commit is contained in:
2024-09-02 13:10:23 -06:00
parent 895271743f
commit c86bdf3451
29 changed files with 268 additions and 249 deletions

View File

@@ -1,5 +1,5 @@
import { describe, it, expect } from "vitest";
import { getDateFromString } from "../timeUtils";
import { dateToMarkdownString, getDateFromString } from "../timeUtils";
describe("Can properly handle expected date formats", () => {
it("can use AM/PM dates", () => {
@@ -39,4 +39,12 @@ describe("Can properly handle expected date formats", () => {
expect(dateObject?.getHours()).toBe(1);
expect(dateObject?.getSeconds()).toBe(0);
});
it("can get correct time from format", () => {
const dateString = "08/27/2024 23:59:00";
const dateObject = getDateFromString(dateString);
expect(dateObject).not.toBeUndefined()
const updatedString = dateToMarkdownString(dateObject!)
expect(updatedString).toBe(dateString)
});
});