mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
15 lines
458 B
TypeScript
15 lines
458 B
TypeScript
import React from "react";
|
|
import { render, screen } from "@testing-library/react";
|
|
import BackButton from "./BackButton";
|
|
|
|
describe("BackButton - component", () => {
|
|
it("renders text and icon", () => {
|
|
render(<BackButton text="Back to software" />);
|
|
|
|
const text = screen.getByText("Back to software");
|
|
const icon = screen.getByTestId("chevron-left-icon");
|
|
|
|
expect(text).toBeInTheDocument();
|
|
expect(icon).toBeInTheDocument();
|
|
});
|
|
});
|