code quality

This commit is contained in:
2026-01-26 11:02:19 +01:00
parent afef777961
commit f877f821ef
14 changed files with 232 additions and 87 deletions

View File

@@ -74,7 +74,7 @@ describe('GetUploadedMediaUseCase', () => {
const mockMetadata = { size: 9 };
mediaStorage.getBytes.mockResolvedValue(mockBytes);
mediaStorage.getMetadata.mockResolvedValue(mockMetadata as any);
mediaStorage.getMetadata.mockResolvedValue(mockMetadata as unknown as { size: number; contentType?: string });
const input = { storageKey: 'media-key' };
const result = await useCase.execute(input);

View File

@@ -23,11 +23,11 @@ describe('AvatarId', () => {
});
it('throws error when null', () => {
expect(() => AvatarId.create(null as any)).toThrow('Avatar ID cannot be empty');
expect(() => AvatarId.create(null as unknown as string)).toThrow('Avatar ID cannot be empty');
});
it('throws error when undefined', () => {
expect(() => AvatarId.create(undefined as any)).toThrow('Avatar ID cannot be empty');
expect(() => AvatarId.create(undefined as unknown as string)).toThrow('Avatar ID cannot be empty');
});
});