website refactor

This commit is contained in:
2026-01-16 19:38:55 +01:00
parent 095885544b
commit 26fc726556
73 changed files with 232 additions and 213 deletions

View File

@@ -5,9 +5,10 @@ import {
GetEntitySponsorshipPricingUseCase,
type GetEntitySponsorshipPricingInput
} from './GetEntitySponsorshipPricingUseCase';
import type { SponsorshipPricingRepository } from '../../domain/repositories/SponsorshipPricingRepository';
describe('GetEntitySponsorshipPricingUseCase', () => {
let mockSponsorshipPricingRepo: any;
let mockSponsorshipPricingRepo: SponsorshipPricingRepository;
let mockLogger: Logger;
let mockFindByEntity: Mock;
@@ -22,7 +23,7 @@ describe('GetEntitySponsorshipPricingUseCase', () => {
save: vi.fn(),
exists: vi.fn(),
findAcceptingApplications: vi.fn(),
};
} as unknown as SponsorshipPricingRepository;
mockLogger = {
debug: vi.fn(),
info: vi.fn(),
@@ -32,7 +33,7 @@ describe('GetEntitySponsorshipPricingUseCase', () => {
});
it('should return PRICING_NOT_CONFIGURED when no pricing found', async () => {
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo as any,
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo,
mockLogger);
const dto: GetEntitySponsorshipPricingInput = {
@@ -54,7 +55,7 @@ describe('GetEntitySponsorshipPricingUseCase', () => {
});
it('should return pricing data when found', async () => {
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo as any,
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo,
mockLogger);
const dto: GetEntitySponsorshipPricingInput = {
@@ -106,7 +107,7 @@ describe('GetEntitySponsorshipPricingUseCase', () => {
});
it('should return error when repository throws', async () => {
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo as any,
const useCase = new GetEntitySponsorshipPricingUseCase(mockSponsorshipPricingRepo,
mockLogger);
const dto: GetEntitySponsorshipPricingInput = {