UNPKG

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