π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π§ͺ Update tests for custom widget number formatting
Alicia Sykes77b39b1053b2
diff --git a/tests/unit/customapi-helpers.test.js b/tests/unit/customapi-helpers.test.jsindex ed586893..4a539db8 100644--- a/tests/unit/customapi-helpers.test.js+++ b/tests/unit/customapi-helpers.test.js@@ -75,12 +75,9 @@ describe('CustomApiHelpers - formatValue', () => {expect(formatValue('abc', { format: 'bytes' })).toBe('abc');});- it('bytes: handles zero and values below one unit', () => {+ it('bytes: handles zero, fractional and negative values', () => {expect(formatValue(0, { format: 'bytes' })).toBe('0 Bytes');expect(formatValue(0.5, { format: 'bytes' })).toBe('0.5 Bytes');- });-- it('bytes: keeps the sign of negative values', () => {expect(formatValue(-1073741824, { format: 'bytes' })).toBe('-1 GB');});