chore: Enhance database debugging setup and expand test mocks for Drizzle queries and Discord API interactions.
Some checks failed
Deploy to Production / test (push) Failing after 29s
Deploy to Production / build (push) Has been skipped
Deploy to Production / deploy (push) Has been skipped

This commit is contained in:
syntaxbullet
2026-01-30 16:12:15 +01:00
parent 7049cbfd9d
commit 9a2fc101da
10 changed files with 43 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ import { users, userTimers } from "@db/schema";
// Mock dependencies
const mockFindFirst = mock();
const mockFindMany = mock(() => Promise.resolve([]));
const mockUpdate = mock();
const mockSet = mock();
const mockWhere = mock();
@@ -24,8 +25,10 @@ mockOnConflictDoUpdate.mockResolvedValue({});
mock.module("@shared/db/DrizzleClient", () => {
const createMockTx = () => ({
query: {
users: { findFirst: mockFindFirst },
userTimers: { findFirst: mockFindFirst },
userQuests: { findMany: mockFindMany },
},
update: mockUpdate,
insert: mockInsert,