1 | import React from "react";
|
2 |
|
3 | import { app } from "@/test/elements";
|
4 | import { renderApp } from "@/test/renderApp";
|
5 |
|
6 | import { StylingCss } from "./StylingCss";
|
7 |
|
8 | const today = new Date(2021, 10, 25);
|
9 |
|
10 | beforeAll(() => jest.setSystemTime(today));
|
11 | afterAll(() => jest.useRealTimers());
|
12 |
|
13 | beforeEach(() => {
|
14 | renderApp(<StylingCss />);
|
15 | });
|
16 |
|
17 | test("the caption should use the custom class name", () => {
|
18 | expect(app().getElementsByClassName("caption_aqua")[0]).toHaveTextContent(
|
19 | "November 2021"
|
20 | );
|
21 | });
|