Skip to content

Commit d1229d8

Browse files
fix(tests): update PromptForm mock to include savePromptTags and groupPromptsByCollection
1 parent 148156a commit d1229d8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

__tests__/components/PromptForm.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ import { PromptForm } from "@/components/PromptForm";
2020
// and call mockReturnValue() to inject our named jest.fn() references.
2121
jest.mock("next/navigation", () => ({ useRouter: jest.fn() }));
2222
jest.mock("@/lib/hooks/usePrompts", () => ({ usePrompts: jest.fn() }));
23-
jest.mock("@/lib/promptData", () => ({ savePrompt: jest.fn(() => Promise.resolve()) }));
23+
jest.mock("@/lib/promptData", () => ({
24+
savePrompt: jest.fn(() => Promise.resolve()),
25+
savePromptTags: jest.fn(() => Promise.resolve()),
26+
groupPromptsByCollection: jest.fn(() => ({})),
27+
}));
2428
jest.mock("@/components/AuthProvider", () => ({ useAuth: jest.fn() }));
2529

2630
import { useRouter } from "next/navigation";

0 commit comments

Comments
 (0)