mirror of
https://github.com/alexta69/metube.git
synced 2026-06-16 08:16:12 +00:00
implement tests
This commit is contained in:
@@ -12,4 +12,10 @@ describe('SpeedPipe', () => {
|
||||
expect(pipe.transform(1024)).toBe('1 KB/s');
|
||||
expect(pipe.transform(1536)).toBe('1.5 KB/s');
|
||||
});
|
||||
|
||||
it('formats MB/s and GB/s', () => {
|
||||
const pipe = new SpeedPipe();
|
||||
expect(pipe.transform(1024 * 1024)).toBe('1 MB/s');
|
||||
expect(pipe.transform(1024 * 1024 * 1024)).toBe('1 GB/s');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user