UNPKG

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