website refactor

This commit is contained in:
2026-01-16 23:44:37 +01:00
parent b22c705674
commit b8a9528ef3
5 changed files with 43 additions and 14 deletions

View File

@@ -78,10 +78,14 @@ class MockAvatarGenerationAdapter implements AvatarGenerationPort {
}
class MockLogger implements Logger {
debug(message: string, context?: unknown): void {}
info(message: string, context?: unknown): void {}
warn(message: string, context?: unknown): void {}
error(message: string, error?: Error, context?: unknown): void {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
debug(_message: string, _context?: unknown): void {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
info(_message: string, _context?: unknown): void {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
warn(_message: string, _context?: unknown): void {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
error(_message: string, _error?: Error, _context?: unknown): void {}
}
import { MediaResolverAdapter } from '@adapters/media/MediaResolverAdapter';

View File

@@ -1,6 +1,6 @@
import type { IAchievementRepository } from '@core/identity/domain/repositories/AchievementRepository';
import type { AchievementRepository } from '@core/identity/domain/repositories/AchievementRepository';
import { Test, TestingModule } from '@nestjs/testing';
import { beforeEach, describe, expect, it } from 'vitest';
import { beforeEach, describe, expect, it, vi, afterEach } from 'vitest';
import { ACHIEVEMENT_REPOSITORY_TOKEN } from './AchievementPersistenceTokens';
describe('AchievementPersistenceModule', () => {
@@ -27,7 +27,7 @@ describe('AchievementPersistenceModule', () => {
imports: [AchievementPersistenceModule],
}).compile();
const repository = module.get<IAchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
const repository = module.get<AchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
// The adapter should provide the domain interface methods
expect(repository).toBeDefined();
expect(typeof repository.createAchievement).toBe('function');
@@ -50,7 +50,7 @@ describe('AchievementPersistenceModule', () => {
imports: [AchievementPersistenceModule],
}).compile();
const repository = module.get<IAchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
const repository = module.get<AchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
// The adapter should provide the domain interface methods
expect(repository).toBeDefined();
expect(typeof repository.createAchievement).toBe('function');
@@ -68,7 +68,7 @@ describe('AchievementPersistenceModule', () => {
imports: [AchievementPersistenceModule],
}).compile();
const repository = module.get<IAchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
const repository = module.get<AchievementRepository>(ACHIEVEMENT_REPOSITORY_TOKEN);
// The adapter should provide the domain interface methods
expect(repository).toBeDefined();
expect(typeof repository.createAchievement).toBe('function');