Rocky_Mountain_Vending/.pnpm-store/v10/files/ec/6670032dcc2c92160c6d179688b932c04d5b13fbcc847f376c4821d2cbcf84e5303f0b798bac1b51b8c4e6ca00b20d265a9b89120eb79418c507ea31ea6650
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

27 lines
790 B
Text

import { es } from "date-fns/locale/es";
import { defaultLocale, DateLib } from "../classes/DateLib.js";
import { formatCaption } from "./formatCaption";
const date = new Date(2022, 10, 21);
test("should return the formatted caption", () => {
expect(
formatCaption(date, {}, new DateLib({ locale: defaultLocale }))
).toEqual("November 2022");
});
describe("when a locale is passed in through dateLib argument", () => {
test("should format using the locale", () => {
expect(formatCaption(date, {}, new DateLib({ locale: es }))).toEqual(
"noviembre 2022"
);
});
});
describe("when a locale is passed in from options", () => {
test("should format using the locale", () => {
expect(formatCaption(date, { locale: es })).toEqual("noviembre 2022");
});
});