mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-20 14:34:05 +01:00
setup mock cookies
This commit is contained in:
parent
a0b86ce324
commit
5a498994f9
@ -2,18 +2,22 @@ import { render, screen } from "@testing-library/react";
|
|||||||
import Home from "@/app/page";
|
import Home from "@/app/page";
|
||||||
import '@testing-library/jest-dom'
|
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", () => {
|
describe("Test Setup", () => {
|
||||||
it("should be true", () => {
|
it("should be true", () => {
|
||||||
expect(true).toBe(true);
|
expect(true).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// describe("Home Component", () => {
|
describe("Home Component", () => {
|
||||||
// it("renders without crashing", () => {
|
it("renders without crashing", async () => {
|
||||||
// render(<Home />);
|
render(await Home());
|
||||||
|
});
|
||||||
// // Check if a key element is present, like the page title
|
});
|
||||||
// // expect(screen.getByText("Explore the world of ventures")).toBeInTheDocument();
|
|
||||||
// expect(true).toBe(true);
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
Loading…
Reference in New Issue
Block a user