diff --git a/__tests__/Home.test.tsx b/__tests__/Home.test.tsx index 9385c54..f7280df 100644 --- a/__tests__/Home.test.tsx +++ b/__tests__/Home.test.tsx @@ -2,18 +2,22 @@ import { render, screen } from "@testing-library/react"; import Home from "@/app/page"; import '@testing-library/jest-dom' +// Mock Cookies +jest.mock("next/headers", () => ({ + cookies: jest.fn(() => ({ + getAll: jest.fn(() => [{ name: "test", value: "cookieValue" }]), // Simulate returning cookies + setAll: jest.fn(), // Simulate setAll method + })), +})); + describe("Test Setup", () => { it("should be true", () => { expect(true).toBe(true); }); }); -// describe("Home Component", () => { -// it("renders without crashing", () => { -// render(); - -// // Check if a key element is present, like the page title -// // expect(screen.getByText("Explore the world of ventures")).toBeInTheDocument(); -// expect(true).toBe(true); -// }); -// }); \ No newline at end of file +describe("Home Component", () => { + it("renders without crashing", async () => { + render(await Home()); + }); +}); \ No newline at end of file