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

@@ -10,11 +10,20 @@ import {
type WithdrawFromLeagueWalletInput
} from './WithdrawFromLeagueWalletUseCase';
import { LeagueRepository } from '../../domain/repositories/LeagueRepository';
import { LeagueWalletRepository } from '../../domain/repositories/LeagueWalletRepository';
import { TransactionRepository } from '../../domain/repositories/TransactionRepository';
describe('WithdrawFromLeagueWalletUseCase', () => {
let leagueRepository: { findById: Mock };
let walletRepository: { findByLeagueId: Mock; update: Mock };
let transactionRepository: { create: Mock };
let logger: Logger & { error: Mock };
let logger: {
debug: Mock;
info: Mock;
warn: Mock;
error: Mock;
};
let useCase: WithdrawFromLeagueWalletUseCase;
beforeEach(() => {
@@ -27,12 +36,14 @@ describe('WithdrawFromLeagueWalletUseCase', () => {
info: vi.fn(),
warn: vi.fn(),
error: vi.fn()
} as any;
};
useCase = new WithdrawFromLeagueWalletUseCase(leagueRepository as any,
walletRepository as any,
transactionRepository as any,
logger);
useCase = new WithdrawFromLeagueWalletUseCase(
leagueRepository as unknown as LeagueRepository,
walletRepository as unknown as LeagueWalletRepository,
transactionRepository as unknown as TransactionRepository,
logger as unknown as Logger
);
});
it('returns LEAGUE_NOT_FOUND when league is missing', async () => {