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

@@ -1,15 +1,23 @@
import { describe, it, expect, beforeEach, vi, Mock } from 'vitest';
import { describe, it, expect, beforeEach, vi, type Mock } from 'vitest';
import {
GetLeagueAdminUseCase,
type GetLeagueAdminInput,
type GetLeagueAdminResult,
type GetLeagueAdminErrorCode,
} from './GetLeagueAdminUseCase';
import type { LeagueRepository } from '../../domain/repositories/LeagueRepository';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
describe('GetLeagueAdminUseCase', () => {
let mockLeagueRepo: any;
let mockLeagueRepo: {
findById: Mock;
findAll: Mock;
create: Mock;
update: Mock;
delete: Mock;
exists: Mock;
findByOwnerId: Mock;
searchByName: Mock;
};
let mockFindById: Mock;
beforeEach(() => {
@@ -26,7 +34,7 @@ describe('GetLeagueAdminUseCase', () => {
};
});
const createUseCase = () => new GetLeagueAdminUseCase(mockLeagueRepo);
const createUseCase = () => new GetLeagueAdminUseCase(mockLeagueRepo as unknown as LeagueRepository);
const params: GetLeagueAdminInput = {
leagueId: 'league1',