react-day-picker / src /labels /labelWeekday.test.ts
AbdulElahGwaith's picture
Upload folder using huggingface_hub
cf86710 verified
import { es } from "../locale/es.js";
import { labelWeekday } from "./labelWeekday";
const weekDay = new Date(2022, 10, 21);
test("should return the formatted weekday name", () => {
expect(labelWeekday(weekDay)).toEqual("Monday");
});
describe("when a locale is passed in", () => {
test("should format using the locale", () => {
expect(labelWeekday(weekDay, { locale: es })).toEqual("lunes");
});
});