/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { render, screen } from "@testing-library/react"; import { Waiting, defaultWaitingLabel } from "../components/index.js"; describe("Waiting component tests", () => { it("Displays default label when a label is not specified", async (): Promise => { render(); await screen.findByText(defaultWaitingLabel); // Will throw if exact text not found }); it("Displays the provided label", async (): Promise => { const label = "Hello world!"; render(); await screen.findByText(label); // Will throw if exact text not found }); });