mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-15 04:19:08 +00:00
fix(ui): mock project router in keys tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e50d78760b
commit
a4538e5454
1 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,11 @@ import type { OnUrlUpdateFunction } from "nuqs/adapters/testing";
|
|||
import { fireEvent, renderWithProviders, screen, waitFor } from "../../../../../tests/test-utils";
|
||||
import { ProjectKeysSection } from "./ProjectKeysSection";
|
||||
|
||||
vi.mock("next/navigation", async () => ({
|
||||
...(await vi.importActual("next/navigation")),
|
||||
useRouter: () => ({ push: vi.fn() }),
|
||||
}));
|
||||
|
||||
const mockUseKeys = vi.fn();
|
||||
vi.mock("@/app/(dashboard)/hooks/keys/useKeys", () => ({
|
||||
useKeys: (...args: unknown[]) => mockUseKeys(...args),
|
||||
Loading…
Add table
Reference in a new issue