mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-20 13:39:07 -04:00
Use 1024 based file size units to follow consistency
This commit is contained in:
parent
d15ac590d7
commit
a2ca2ecb37
3 changed files with 11 additions and 30 deletions
|
@ -300,20 +300,20 @@ describe('Helper', function () {
|
|||
return $.PrivateBin.Helper.formatBytes(500) === '500 B';
|
||||
});
|
||||
|
||||
jsc.property('formats kilobytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(1500) === '1.5 KB';
|
||||
jsc.property('formats kibibytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(1500) === '1.46 KiB';
|
||||
});
|
||||
|
||||
jsc.property('formats megabytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '2 MB';
|
||||
jsc.property('formats mebibytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(2 * 1000 * 1000) === '1.91 MiB';
|
||||
});
|
||||
|
||||
jsc.property('formats gigabytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.45 GB';
|
||||
jsc.property('formats gibibytes correctly', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(3.45 * 1000 * 1000 * 1000) === '3.21 GiB';
|
||||
});
|
||||
|
||||
jsc.property('rounds to two decimal places', function () {
|
||||
return $.PrivateBin.Helper.formatBytes(1234567) === '1.23 MB';
|
||||
return $.PrivateBin.Helper.formatBytes(1234567) === '1.18 MiB';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue