UNPKG

388 BTypeScriptView Raw
1import React from "react";
2
3import { render, screen } from "@/test/render";
4
5import { FixedWeeks } from "./Fixedweeks";
6
7const today = new Date(2021, 10, 25);
8
9beforeAll(() => jest.setSystemTime(today));
10afterAll(() => jest.useRealTimers());
11
12beforeEach(() => {
13 render(<FixedWeeks />);
14});
15
16test("should render 7 rows", () => {
17 expect(screen.getAllByRole("row")).toHaveLength(7);
18});