mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
running smooth again
This commit is contained in:
@@ -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)
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user