implement tests

This commit is contained in:
Alex Shnitman
2026-03-20 13:12:31 +02:00
parent 0bf508dbc6
commit a1f2fe3e73
21 changed files with 1750 additions and 388 deletions
+6
View File
@@ -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');
});
});