Skip to content

An AI-powered search engine with a generative UI

fix: correct mock return type for deleteChat function

Yoshiki Miura4f23e3a7d7ec
diff --git a/lib/actions/__tests__/chat-db.test.ts b/lib/actions/__tests__/chat-db.test.ts
index e77285f4..dffeaafd 100644
--- a/lib/actions/__tests__/chat-db.test.ts
+++ b/lib/actions/__tests__/chat-db.test.ts
@@ -119,7 +119,7 @@ describe('Chat Actions - deleteChat', () => {
})
it('should delete a chat for an authenticated user and return success', async () => {
- mockDeleteChatDb.mockResolvedValue({ deletedCount: 1 })
+ mockDeleteChatDb.mockResolvedValue({})
const result = await deleteChat(chatId)
expect(mockGetCurrentUserId).toHaveBeenCalledTimes(1)
expect(mockDeleteChatDb).toHaveBeenCalledWith(chatId, userId)