mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
better matching
This commit is contained in:
19
nextjs/src/models/local/tests/timeUtils.test.ts
Normal file
19
nextjs/src/models/local/tests/timeUtils.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { getDateFromString } from "../timeUtils";
|
||||
|
||||
describe("Can properly handle expected date formats", () => {
|
||||
it("can use AM/PM dates", () =>{
|
||||
const dateString = "8/27/2024 1:00:00 AM"
|
||||
const dateObject = getDateFromString(dateString)
|
||||
expect(dateObject).not.toBeUndefined()
|
||||
})
|
||||
it("can use 24 hour dates", () =>{
|
||||
const dateString = "8/27/2024 23:95:00"
|
||||
const dateObject = getDateFromString(dateString)
|
||||
expect(dateObject).not.toBeUndefined()
|
||||
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user