import { describe, expect, it } from "vitest"; import { formatRescheduleHover } from "@/domain/work-orders/utils/reschedule-indicator"; describe("formatRescheduleHover", () => { it("includes the count without an original date when the API omits it", () => { expect(formatRescheduleHover(4)).toBe( "Rescheduled 4 times — this WO has had its date changed 4 times.", ); }); it("appends the original date when the board DTO provides originalDate", () => { expect(formatRescheduleHover(3, "2026-05-08")).toBe( "Rescheduled 3 times — this WO has had its date changed 3 times. Original date: May 8, 2026.", ); }); });