mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
18 lines
545 B
TypeScript
18 lines
545 B
TypeScript
import React from "react";
|
|
import { render } from "@testing-library/react";
|
|
|
|
import PlatformIcon from "./PlatformIcon";
|
|
|
|
describe("PlatformIcon - component", () => {
|
|
it("renders", () => {
|
|
const { container } = render(<PlatformIcon name="linux" />);
|
|
expect(container.querySelector(".platform-icon")).toBeInTheDocument();
|
|
});
|
|
|
|
it("renders text if no icon", () => {
|
|
const { container } = render(<PlatformIcon name="All" />);
|
|
expect(
|
|
container.querySelector(".fleeticon-single-host")
|
|
).toBeInTheDocument();
|
|
});
|
|
});
|