1 | import React from "react";
|
2 |
|
3 | import { gridcell } from "@/test/elements";
|
4 | import { render } from "@/test/render";
|
5 |
|
6 | import { ModifiersClassnames } from "./ModifiersClassnames";
|
7 |
|
8 | const days = [
|
9 | new Date(2021, 5, 8),
|
10 | new Date(2021, 5, 9),
|
11 | new Date(2021, 5, 11)
|
12 | ];
|
13 |
|
14 | const today = new Date(2021, 10, 25);
|
15 |
|
16 | beforeAll(() => jest.setSystemTime(today));
|
17 | afterAll(() => jest.useRealTimers());
|
18 |
|
19 | beforeEach(() => {
|
20 | render(<ModifiersClassnames />);
|
21 | });
|
22 |
|
23 | test.each(days)("the day %s should have the `my-booked-class` class", (day) => {
|
24 | expect(gridcell(day)).toHaveClass("my-booked-class");
|
25 | });
|