/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import React from "react";
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import MetricsWidget from "../MetricsWidget";
test("renders the title and summary of the metrics preview component", async () => {
const { getByText } = render(
,
{ wrapper: MemoryRouter },
);
expect(getByText("test title")).toBeInTheDocument();
});
test("metrics preview should match snapshot", async () => {
const wrapper = render(
,
{ wrapper: MemoryRouter },
);
expect(wrapper.container).toMatchSnapshot();
});