import { screen, render } from "@testing-library/react";
import { axe } from "jest-axe";
import { Backdrop } from "../../components/Backdrop";
describe("Backdrop", () => {
test("Should render component correctly.", () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
});
describe("Accessibility", () => {
test("Should have no accessibility violations.", async () => {
const { container } = render();
const results = await axe(container);
expect(results).toHaveNoViolations();
});
});
describe("Props", () => {
test("Should render with no background correctly.", () => {
render(
);
expect(screen.getByTestId("Backdrop")).toHaveClass(
"noBackground"
);
});
});