view models
This commit is contained in:
@@ -65,10 +65,10 @@ describe('MediaViewModel', () => {
|
||||
url: 'https://example.com/image.jpg',
|
||||
type: 'image',
|
||||
uploadedAt: new Date().toISOString(),
|
||||
size: 2048000, // 2 MB
|
||||
size: 2048000, // 2 MB in base-10, ~1.95 MB in base-2
|
||||
});
|
||||
|
||||
expect(viewModel.formattedSize).toBe('2.00 MB');
|
||||
|
||||
expect(viewModel.formattedSize).toBe('1.95 MB');
|
||||
});
|
||||
|
||||
it('should handle very small file sizes', () => {
|
||||
|
||||
Reference in New Issue
Block a user