From 8a24ee890dedc6749ace591f56faf412dd34fa49 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Thu, 18 Jun 2026 10:12:29 +0200 Subject: [PATCH] test: add domainSubmission mock to profile-counts tests --- backend/tests/social/profile-counts.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/tests/social/profile-counts.test.ts b/backend/tests/social/profile-counts.test.ts index 5c25ddd..ddaa6a5 100644 --- a/backend/tests/social/profile-counts.test.ts +++ b/backend/tests/social/profile-counts.test.ts @@ -23,6 +23,9 @@ const mocks = vi.hoisted(() => ({ userScore: { findUnique: vi.fn(), }, + domainSubmission: { + count: vi.fn(), + }, })); vi.mock("../../server/utils/prisma", () => ({ @@ -31,6 +34,7 @@ vi.mock("../../server/utils/prisma", () => ({ userFollow: mocks.userFollow, profile: mocks.profile, userScore: mocks.userScore, + domainSubmission: mocks.domainSubmission, }), })); @@ -76,6 +80,7 @@ beforeEach(() => { mocks.communityPost.count.mockResolvedValue(0); mocks.userFollow.count.mockResolvedValue(0); mocks.userFollow.findUnique.mockResolvedValue(null); + mocks.domainSubmission.count.mockResolvedValue(0); }); async function callHandler() {