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>
19 lines
523 B
Text
19 lines
523 B
Text
import { es } from "date-fns/locale/es";
|
|
|
|
import { DateLib } from "../classes/DateLib";
|
|
|
|
import { formatMonthDropdown } from "./formatMonthDropdown";
|
|
|
|
const date = new Date(2022, 10, 21);
|
|
|
|
test("should return the formatted month dropdown label", () => {
|
|
expect(formatMonthDropdown(date)).toEqual("November");
|
|
});
|
|
|
|
describe("when a locale is passed in", () => {
|
|
test("should format using the locale", () => {
|
|
expect(formatMonthDropdown(date, new DateLib({ locale: es }))).toEqual(
|
|
"noviembre"
|
|
);
|
|
});
|
|
});
|