Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-10 13:38:34 +02:00
parent 996dcdc22d
commit 1e82f5f06f
6 changed files with 45 additions and 3 deletions

View File

@ -13,3 +13,9 @@ test('Converts a number in bytes to a human-readable string.', () => {
test('Converts a number in bytes to a human-readable string.', () => {
expect(prettyBytes(123456789, 3, false)).toBe('123MB');
});
test('Converts a number in bytes to a human-readable string.', () => {
expect(prettyBytes(0, 3, false)).toBe('0B');
});
test('Converts a number in bytes to a human-readable string.', () => {
expect(prettyBytes(0, 3, true)).toBe('0 B');
});