1 | import { CalendarDay } from "./CalendarDay";
|
2 | import { CalendarWeek } from "./CalendarWeek";
|
3 |
|
4 | let week: CalendarWeek;
|
5 | const days = [
|
6 | new CalendarDay(new Date(2023, 1, 12), new Date(2023, 1, 1)),
|
7 | new CalendarDay(new Date(2023, 1, 2023), new Date(2023, 1, 1))
|
8 | ];
|
9 |
|
10 | beforeEach(() => {
|
11 | week = new CalendarWeek(1, days);
|
12 | });
|
13 |
|
14 | it("should have a weekNumber", () => {
|
15 | expect(week.weekNumber).toEqual(1);
|
16 | });
|
17 |
|
18 | it("should have an array of days", () => {
|
19 | expect(week.days).toBe(days);
|
20 | expect(week.days[0]).toBeInstanceOf(CalendarDay);
|
21 | });
|