UNPKG

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