From ab2795d86c664a5f99855d5aa50c593a6d832414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondra=20Jano=C5=A1ka?= Date: Wed, 4 Sep 2024 15:32:33 +0200 Subject: [PATCH] =?UTF-8?q?one=20more=20test=20pro=20klid=20du=C5=A1e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Quantity.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Quantity.test.ts b/src/Quantity.test.ts index a6ded99..934b842 100644 --- a/src/Quantity.test.ts +++ b/src/Quantity.test.ts @@ -178,6 +178,11 @@ describe('Quantity', () => { expect(q.toString({ decimalPlaces: 1 })).toBe('1.9 m'); q = new Quantity(1.8, SI.parseUnit('m')); expect(q.toString({ decimalPlaces: 0 })).toBe('2 m'); + + q = new Quantity(2.1, SI.parseUnit('m')); + expect(q.toString({ decimalPlaces: 0 })).toBe('2 m'); + q = new Quantity(2.11, SI.parseUnit('m')); + expect(q.toString({ decimalPlaces: 1 })).toBe('2.1 m'); }); }); });