mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-12 11:26:07 +03:00
cd78594590
* test: configure vitest and RTL * test: add test boilerplates * feat(ci): added test-unit frontend --------- Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
23 lines
604 B
TypeScript
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();
|
|
});
|
|
});
|