code quality
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user