feat: ux enhancement for envelope reveal

This commit is contained in:
ramvignesh-b
2026-04-21 04:21:59 +05:30
parent b5d55bd258
commit 4c204b0a80
7 changed files with 102 additions and 55 deletions
+9
View File
@@ -1,4 +1,5 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { formatDate } from "../../../../../../../../../home/atom/Documents/code/pi_ku/frontend/src/utils/dateFormat";
import { formatRelativeDate } from "./dateFormat";
describe("formatRelativeDate", () => {
@@ -35,3 +36,11 @@ describe("formatRelativeDate", () => {
expect(result).toBe("Apr 1, 2026, 6:45 PM");
});
});
describe("formatDate", () => {
it("should format a new date as mmm dd, yyyy", () => {
const result = formatDate("2026-04-01T10:15:00Z");
expect(result).toBe("April 1, 2026");
});
});