import "@testing-library/jest-dom";
import { render } from "@testing-library/react";
import Footer from "./Footer";
const LeftSection = () => (
This is content for the left section
);
const RightSection = () => (
This is content for the right section
);
describe("Footer", () => {
describe("when passed no props", () => {
test("renders without crashing", () => {
const { container } = render();
expect(container).toBeTruthy();
});
});
describe("when passed leftSection and rightSection props", () => {
test("renders without crashing", () => {
const { container } = render(
}
rightSection={}
/>,
);
expect(container).toBeTruthy();
expect(container.querySelector(".left-section")).toBeTruthy();
expect(container.querySelector(".right-section")).toBeTruthy();
});
});
});