fleet/frontend/components/BackLink/BackLink.tests.tsx
2022-11-15 08:53:39 -05:00

15 lines
437 B
TypeScript

import React from "react";
import { render, screen } from "@testing-library/react";
import BackLink from "./BackLink";
describe("BackLink - component", () => {
it("renders text and icon", () => {
render(<BackLink text="Back to software" />);
const text = screen.getByText("Back to software");
const icon = screen.getByTestId("Icon");
expect(text).toBeInTheDocument();
expect(icon).toBeInTheDocument();
});
});