import { render } from "@testing-library/react";
import NavBar from "./NavBar";
describe("NavBar", () => {
const props = {
logo:
Logo
,
links: [
{
href: "/home",
label: "Home",
hideOnDesktop: false,
hideOptions: () => false,
},
],
Link: ({
href,
children,
}: React.AnchorHTMLAttributes & {
children?: React.ReactNode;
}) => {children},
loggedIn: true,
className: "test-class",
midSection: Mid Section
,
};
describe("When viewed on a desktop", () => {
test("renders logo and midSection", () => {
window.innerWidth = 1280;
window.innerHeight = 1080;
window.dispatchEvent(new Event("resize"));
const { getByText } = render();
expect(getByText("Logo")).toBeDefined();
expect(getByText("Mid Section")).toBeDefined();
});
test.todo("renders the desktop menu");
});
describe("When viewed on a tablet or mobile device", () => {
test.todo("renders the mobile menu");
test.todo("toggles the mobile menu when the hamburger is clicked");
});
});