diff --git a/api/src/server.test.ts b/api/src/server.test.ts index 1320721..f69d021 100644 --- a/api/src/server.test.ts +++ b/api/src/server.test.ts @@ -66,7 +66,14 @@ mock.module("@shared/lib/config", () => ({ } })); -// 4. Mock BotClient (used by stats helper for maintenanceMode) +// 4. Mock auth (bypass authentication for testing) +mock.module("./routes/auth.routes", () => ({ + authRoutes: { name: "auth", handler: () => null }, + isAuthenticated: () => true, + getSession: () => ({ discordId: "123", username: "testuser", expiresAt: Date.now() + 3600000 }), +})); + +// 5. Mock BotClient (used by stats helper for maintenanceMode) mock.module("../../bot/lib/BotClient", () => ({ AuroraClient: { maintenanceMode: false,