File size: 419 Bytes
cf86710 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import { es } from "../locale/es.js";
import { formatWeekdayName } from "./formatWeekdayName";
const date = new Date(2022, 10, 21);
test("should return the formatted weekday name", () => {
expect(formatWeekdayName(date)).toEqual("Mo");
});
describe("when a locale is passed in", () => {
test("should format using the locale", () => {
expect(formatWeekdayName(date, { locale: es })).toEqual("lu");
});
});
|