fleet/frontend/components/BackLink/BackLink.tests.tsx
2023-08-28 13:09:21 -04:00

15 lines
445 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("chevron-icon");
expect(text).toBeInTheDocument();
expect(icon).toBeInTheDocument();
});
});