Skip to content

Commit

Permalink
test: adjust test for 2 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Aug 27, 2024
1 parent 373c225 commit 484ffed
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/modules/__tests__/renderValue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -53,7 +53,7 @@ const tests = [
},
{
value: 33777889.56,
expected: '33777889.6',
expected: '33777889.56',
valueType: VALUE_TYPE_NUMBER,
round: true,
dgs: DGS_NONE,
Expand All @@ -74,7 +74,7 @@ const tests = [
},
{
value: 1.101,
expected: '1.1',
expected: '1.10',
valueType: VALUE_TYPE_NUMBER,
round: true,
dgs: DGS_SPACE,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 484ffed

Please sign in to comment.