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

@@ -2,15 +2,16 @@
* Tests for GetTeamRatingLedgerQuery
*/
import { describe, it, expect, beforeEach, vi, Mock } from 'vitest';
import { describe, it, expect, beforeEach, vi, type Mock } from 'vitest';
import { GetTeamRatingLedgerQuery, GetTeamRatingLedgerQueryHandler } from './GetTeamRatingLedgerQuery';
import { TeamRatingEvent } from '../../domain/entities/TeamRatingEvent';
import { TeamRatingEventId } from '../../domain/value-objects/TeamRatingEventId';
import { TeamRatingDimensionKey } from '../../domain/value-objects/TeamRatingDimensionKey';
import { TeamRatingDelta } from '../../domain/value-objects/TeamRatingDelta';
import type { TeamRatingEventRepository } from '../../domain/repositories/TeamRatingEventRepository';
describe('GetTeamRatingLedgerQuery', () => {
let mockRatingEventRepo: any;
let mockRatingEventRepo: { findEventsPaginated: Mock };
let handler: GetTeamRatingLedgerQueryHandler;
beforeEach(() => {
@@ -18,7 +19,7 @@ describe('GetTeamRatingLedgerQuery', () => {
findEventsPaginated: vi.fn(),
};
handler = new GetTeamRatingLedgerQueryHandler(mockRatingEventRepo);
handler = new GetTeamRatingLedgerQueryHandler(mockRatingEventRepo as unknown as TeamRatingEventRepository);
});
describe('execute', () => {

View File

@@ -2,7 +2,7 @@
* Tests for GetTeamRatingsSummaryQuery
*/
import { describe, it, expect, beforeEach, vi, Mock } from 'vitest';
import { describe, it, expect, beforeEach, vi, type Mock } from 'vitest';
import { GetTeamRatingsSummaryQuery, GetTeamRatingsSummaryQueryHandler } from './GetTeamRatingsSummaryQuery';
import { TeamRatingSnapshot } from '../../domain/services/TeamRatingSnapshotCalculator';
import { TeamRatingValue } from '../../domain/value-objects/TeamRatingValue';
@@ -10,10 +10,12 @@ import { TeamRatingEvent } from '../../domain/entities/TeamRatingEvent';
import { TeamRatingEventId } from '../../domain/value-objects/TeamRatingEventId';
import { TeamRatingDimensionKey } from '../../domain/value-objects/TeamRatingDimensionKey';
import { TeamRatingDelta } from '../../domain/value-objects/TeamRatingDelta';
import type { TeamRatingRepository } from '../../domain/repositories/TeamRatingRepository';
import type { TeamRatingEventRepository } from '../../domain/repositories/TeamRatingEventRepository';
describe('GetTeamRatingsSummaryQuery', () => {
let mockTeamRatingRepo: any;
let mockRatingEventRepo: any;
let mockTeamRatingRepo: { findByTeamId: Mock };
let mockRatingEventRepo: { getAllByTeamId: Mock };
let handler: GetTeamRatingsSummaryQueryHandler;
beforeEach(() => {
@@ -25,8 +27,8 @@ describe('GetTeamRatingsSummaryQuery', () => {
};
handler = new GetTeamRatingsSummaryQueryHandler(
mockTeamRatingRepo,
mockRatingEventRepo
mockTeamRatingRepo as unknown as TeamRatingRepository,
mockRatingEventRepo as unknown as TeamRatingEventRepository
);
});