diff --git a/.changeset/dull-walls-tan.md b/.changeset/dull-walls-tan.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/dull-walls-tan.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/harness/web/src/lib/session-record-view.test.ts b/packages/harness/web/src/lib/session-record-view.test.ts index ff548a7a3..41bb111df 100644 --- a/packages/harness/web/src/lib/session-record-view.test.ts +++ b/packages/harness/web/src/lib/session-record-view.test.ts @@ -65,14 +65,17 @@ describe("formatClockTime", () => { const iso = "2026-07-01T10:00:00.000Z"; const formatted = formatClockTime(iso, new Date(iso).getTime()); expect(formatted).toMatch(/^\d{1,2}:\d{2}/); - expect(formatted).not.toMatch(/Jul/); }); it("adds the date for a turn from another day, so a multi-day session has boundaries", () => { - // Same clock time, three days earlier — indistinguishable without a date. - const formatted = formatClockTime("2026-07-01T10:00:00.000Z", Date.parse("2026-07-04T10:00:00.000Z")); - expect(formatted).toMatch(/Jul/); - expect(formatted).toMatch(/\d{1,2}:\d{2}/); + const iso = "2026-07-01T10:00:00.000Z"; + const sameDay = formatClockTime(iso, Date.parse(iso)); + // Same clock time, three days later — indistinguishable without a date. + const otherDay = formatClockTime(iso, Date.parse("2026-07-04T10:00:00.000Z")); + // How the date itself reads is the locale's business; what matters is that + // it's prepended to the exact clock time today's turn would have shown. + expect(otherDay).toContain(`, ${sameDay}`); + expect(otherDay).toMatch(/\d{1,2}:\d{2}/); }); });