website refactor

This commit is contained in:
2026-01-16 18:21:06 +01:00
parent 2f53727702
commit 095885544b
146 changed files with 970 additions and 524 deletions

View File

@@ -134,14 +134,16 @@ class MockUserRatingRepository {
}
}
import { CreateRatingEventDto } from '../dtos/CreateRatingEventDto';
// Mock AppendRatingEventsUseCase
class MockAppendRatingEventsUseCase {
constructor(
private ratingEventRepository: any,
private userRatingRepository: any
private ratingEventRepository: MockRatingEventRepository,
private userRatingRepository: MockUserRatingRepository
) {}
async execute(input: any): Promise<any> {
async execute(input: { userId: string; events: CreateRatingEventDto[] }): Promise<{ events: string[]; snapshotUpdated: boolean }> {
const events: RatingEvent[] = [];
// Create events from input
@@ -195,7 +197,6 @@ describe('Admin Vote Session Use Cases', () => {
// Use dates relative to current time so close() works
const now = new Date(Date.now() - 86400000); // Yesterday
const tomorrow = new Date(Date.now() + 86400000); // Tomorrow
const dayAfter = new Date(Date.now() + 86400000 * 2); // Day after tomorrow
beforeEach(() => {
mockSessionRepo = new MockAdminVoteSessionRepository();