We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b692a1 commit 21d3c2fCopy full SHA for 21d3c2f
tests/unit/filesize.test.js
@@ -243,6 +243,7 @@ describe('filesize', () => {
243
describe('filesize() with number input', () => {
244
it('should handle integer numbers', () => {
245
assert.strictEqual(filesize(1024), '1.02 kB');
246
+ assert.strictEqual(filesize(0), '0 B');
247
assert.strictEqual(filesize(-1024), '-1.02 kB');
248
});
249
@@ -375,6 +376,7 @@ describe('filesize', () => {
375
376
377
378
it('should work with BigInt input and different options', () => {
379
+ assert.strictEqual(filesize(BigInt(1024), { standard: 'jedec' }), '1 KB');
380
assert.strictEqual(filesize(BigInt(1000), { bits: true }), '8 kbit');
381
382
const objectResult = filesize(BigInt(1024), { output: 'object' });
0 commit comments