18 lines
637 B
TypeScript
18 lines
637 B
TypeScript
import { describe, it, expect } from "vitest"
|
|
import { dayLabel } from "../../app/utils/dayLabel"
|
|
|
|
describe("dayLabel", () => {
|
|
it("formats a Saturday as a capitalised French heading", () => {
|
|
const label = dayLabel("2026-06-13T08:30:00Z")
|
|
expect(label).toBe("Samedi 13 juin")
|
|
expect(label.charAt(0)).toBe(label.charAt(0).toUpperCase())
|
|
expect(label).toMatch(/^[A-ZÀ-Ý]/)
|
|
expect(label).toContain("juin")
|
|
})
|
|
|
|
it("formats a Sunday as a capitalised French heading", () => {
|
|
const label = dayLabel("2026-06-14T23:59:00Z")
|
|
expect(label).toBe("Dimanche 14 juin")
|
|
expect(label).toContain("juin")
|
|
})
|
|
})
|