Apply new eslint rules; default to prettier for styling

This commit is contained in:
DaneEveritt 2022-06-26 15:13:52 -04:00
parent f22cce8881
commit dc84af9937
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
218 changed files with 3876 additions and 3564 deletions

View file

@ -13,25 +13,25 @@ describe('@/lib/formatters.ts', function () {
describe('bytesToString()', function () {
it.each([
[ 0, '0 Bytes' ],
[ 0.5, '0 Bytes' ],
[ 0.9, '0 Bytes' ],
[ 100, '100 Bytes' ],
[ 100.25, '100.25 Bytes' ],
[ 100.998, '101 Bytes' ],
[ 512, '512 Bytes' ],
[ 1000, '1 KB' ],
[ 1024, '1.02 KB' ],
[ 5068, '5.07 KB' ],
[ 10_000, '10 KB' ],
[ 11_864, '11.86 KB' ],
[ 1_000_000, '1 MB' ],
[ 1_356_000, '1.36 MB' ],
[ 1_024_000, '1.02 MB' ],
[ 1_000_000_000, '1 GB' ],
[ 1_024_000_000, '1.02 GB' ],
[ 1_678_342_000, '1.68 GB' ],
[ 1_000_000_000_000, '1 TB' ],
[0, '0 Bytes'],
[0.5, '0 Bytes'],
[0.9, '0 Bytes'],
[100, '100 Bytes'],
[100.25, '100.25 Bytes'],
[100.998, '101 Bytes'],
[512, '512 Bytes'],
[1000, '1 KB'],
[1024, '1.02 KB'],
[5068, '5.07 KB'],
[10_000, '10 KB'],
[11_864, '11.86 KB'],
[1_000_000, '1 MB'],
[1_356_000, '1.36 MB'],
[1_024_000, '1.02 MB'],
[1_000_000_000, '1 GB'],
[1_024_000_000, '1.02 GB'],
[1_678_342_000, '1.68 GB'],
[1_000_000_000_000, '1 TB'],
])('should format %d bytes as "%s"', function (input, output) {
expect(bytesToString(input)).toBe(output);
});