diff --git a/frontend/testing/unit/utils/date.test.ts b/frontend/testing/unit/utils/date.test.ts index 80bfe40e..7d878d32 100644 --- a/frontend/testing/unit/utils/date.test.ts +++ b/frontend/testing/unit/utils/date.test.ts @@ -60,6 +60,14 @@ import { test("returns N/A for invalid input", () => { expect(formatLocaleDate("bad-date")).toBe("N/A"); }); + + test("returns N/A for null input", () => { + expect(formatLocaleDate(null)).toBe("N/A"); + }); + + test("returns N/A for undefined input", () => { + expect(formatLocaleDate(undefined)).toBe("N/A"); + }); }); describe("formatLocaleTime", () => { @@ -71,6 +79,14 @@ import { test("returns N/A for invalid input", () => { expect(formatLocaleTime("bad-date")).toBe("N/A"); }); + + test("returns N/A for null input", () => { + expect(formatLocaleTime(null)).toBe("N/A"); + }); + + test("returns N/A for undefined input", () => { + expect(formatLocaleTime(undefined)).toBe("N/A"); + }); }); describe("timezone preference safety", () => {