Rocky_Mountain_Vending/.pnpm-store/v10/files/a7/2bb8d900845da755feacfc95690c69e9c8db1e1ac9bde70d852ff3970c6231e9a4e0d7251f1eeb35575095f203924e0404d5be7e9dc0c40840dca2d4df576b
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

44 lines
1.3 KiB
Text

import { defaultDateLib } from "../classes/DateLib";
import { getDisplayMonths } from "./getDisplayMonths";
describe("getDisplayMonths", () => {
it("should return the months to display in the calendar", () => {
const firstMonth = new Date(2020, 0);
const expectedResult = [new Date(2020, 0)];
const result = getDisplayMonths(firstMonth, undefined, {}, defaultDateLib);
expect(result).toEqual(expectedResult);
});
it("should return the months to display in the calendar when the number of months is greater than 1", () => {
const firstMonth = new Date(2020, 0);
const expectedResult = [
new Date(2020, 0),
new Date(2020, 1),
new Date(2020, 2)
];
const result = getDisplayMonths(
firstMonth,
undefined,
{
numberOfMonths: 3
},
defaultDateLib
);
expect(result).toEqual(expectedResult);
});
it("should return the months to display in the calendar when passing a max date", () => {
const firstMonth = new Date(2020, 0);
const expectedResult = [new Date(2020, 0), new Date(2020, 1)];
const result = getDisplayMonths(
firstMonth,
new Date(2020, 1, 10),
{
numberOfMonths: 3
},
defaultDateLib
);
expect(result).toEqual(expectedResult);
});
});