From 484ffed8f0f781fde874597a33eac5a46ee06234 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Tue, 27 Aug 2024 11:35:45 +0200 Subject: [PATCH] test: adjust test for 2 decimals --- src/modules/__tests__/renderValue.spec.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/__tests__/renderValue.spec.js b/src/modules/__tests__/renderValue.spec.js index 845629bbe..eaf3d2a7c 100644 --- a/src/modules/__tests__/renderValue.spec.js +++ b/src/modules/__tests__/renderValue.spec.js @@ -25,21 +25,21 @@ const tests = [ // Numbers { value: 1000.5, - expected: '1 000.5', + expected: '1 000.50', valueType: VALUE_TYPE_NUMBER, round: true, dgs: DGS_SPACE, }, { - value: 33777889.55, - expected: '33,777,889.5', + value: 33777889.555, + expected: '33,777,889.55', valueType: VALUE_TYPE_NUMBER, round: true, dgs: DGS_COMMA, }, { value: 33777889.556, - expected: '33 777 889.6', + expected: '33 777 889.56', valueType: VALUE_TYPE_NUMBER, round: true, dgs: DGS_SPACE, @@ -53,7 +53,7 @@ const tests = [ }, { value: 33777889.56, - expected: '33777889.6', + expected: '33777889.56', valueType: VALUE_TYPE_NUMBER, round: true, dgs: DGS_NONE, @@ -74,7 +74,7 @@ const tests = [ }, { value: 1.101, - expected: '1.1', + expected: '1.10', valueType: VALUE_TYPE_NUMBER, round: true, dgs: DGS_SPACE, @@ -135,16 +135,16 @@ const tests = [ dgs: DGS_SPACE, }, { - value: -0.0234, - expected: '-2.3%', + value: -0.02345, + expected: '-2.34%', valueType: VALUE_TYPE_NUMBER, numberType: NUMBER_TYPE_ROW_PERCENTAGE, round: true, dgs: DGS_SPACE, }, { - value: -0.0234, - expected: '-2.34%', + value: -0.02345, + expected: '-2.345%', valueType: VALUE_TYPE_NUMBER, numberType: NUMBER_TYPE_ROW_PERCENTAGE, round: false,