UNPKG

452 BTypeScriptView Raw
1import React from "react";
2
3import { render, screen } from "@/test/render";
4
5import { StylingInline } from "./StylingInline";
6
7const today = new Date(2021, 10, 25);
8
9beforeAll(() => jest.setSystemTime(today));
10afterAll(() => jest.useRealTimers());
11
12beforeEach(() => {
13 render(<StylingInline />);
14});
15
16test("the caption should apply the custom style", () => {
17 expect(screen.getByRole("status").parentElement).toHaveStyle({
18 color: "red"
19 });
20});