1 | import { CalendarDay } from "./CalendarDay";
|
2 | import { CalendarMonth } from "./CalendarMonth";
|
3 | import { CalendarWeek } from "./CalendarWeek";
|
4 |
|
5 | let month: CalendarMonth;
|
6 | let date: Date;
|
7 | let weeks: CalendarWeek[];
|
8 | const days1 = [
|
9 | new CalendarDay(new Date(2023, 1, 12), new Date(2023, 1, 1)),
|
10 | new CalendarDay(new Date(2023, 1, 2023), new Date(2023, 1, 1))
|
11 | ];
|
12 | const days2 = [
|
13 | new CalendarDay(new Date(2023, 1, 12), new Date(2023, 1, 1)),
|
14 | new CalendarDay(new Date(2023, 1, 2023), new Date(2023, 1, 1))
|
15 | ];
|
16 | beforeEach(() => {
|
17 | date = new Date();
|
18 | weeks = [new CalendarWeek(1, days1), new CalendarWeek(2, days2)];
|
19 | month = new CalendarMonth(date, weeks);
|
20 | });
|
21 |
|
22 | it("should have a date property", () => {
|
23 | expect(month.date).toEqual(date);
|
24 | });
|
25 |
|
26 | it("should have a weeks property", () => {
|
27 | expect(month.weeks).toEqual(weeks);
|
28 | });
|