Mock next/router in signin tests
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled

This commit is contained in:
shamoon
2026-02-04 21:49:04 -08:00
parent 8792337133
commit 83b5e96682

View File

@@ -11,6 +11,12 @@ vi.mock("utils/config/config", () => ({
getSettings: getSettingsMock, getSettings: getSettingsMock,
})); }));
vi.mock("next/router", () => ({
useRouter: () => ({
query: {},
}),
}));
import { getProviders } from "next-auth/react"; import { getProviders } from "next-auth/react";
import SignInPage, { getServerSideProps } from "pages/auth/signin"; import SignInPage, { getServerSideProps } from "pages/auth/signin";