quivr/frontend/app/(home)/__tests__/Home.test.tsx
Mamadou DICKO cd78594590
Config frontend tests (#408)
* test: configure vitest and RTL

* test: add test boilerplates

* feat(ci): added test-unit frontend

---------

Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
2023-06-29 13:18:30 +02:00

23 lines
604 B
TypeScript

import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { getProcessEnvManager } from "@/lib/helpers/getProcessEnvManager";
import HomePage from "../page";
describe("HomePage", () => {
it("should render HomePage component properly", () => {
const { overwriteEnvValuesWith, resetEnvValues } = getProcessEnvManager();
overwriteEnvValuesWith({
NEXT_PUBLIC_ENV: "not-local",
});
render(<HomePage />);
const homePage = screen.getByTestId("home-page");
expect(homePage).toBeDefined();
resetEnvValues();
});
});