Skip to content

Commit eb3e28c

Browse files
committed
Number: Add compact formatting compiler tests
Ref #759 Fixes #808
1 parent 3e81a35 commit eb3e28c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/compiler/cases/number.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ module.exports = {
1616
return Globalize;
1717
},
1818
cases: function( Globalize ) {
19+
var big = 99999999.99;
1920
Globalize.locale( "en" );
2021
return [
2122
{ formatter: Globalize.numberFormatter(), args: [ Math.PI ] },
2223
{ formatter: Globalize( "es" ).numberFormatter(), args: [ Math.PI ] },
2324
{ formatter: Globalize( "ar" ).numberFormatter(), args: [ Math.PI ] },
2425
{ formatter: Globalize( "zh-u-nu-native" ).numberFormatter(), args: [ Math.PI ] },
25-
{ formatter: Globalize.numberFormatter(), args: [ 99999999.99 ] },
26+
{ formatter: Globalize.numberFormatter(), args: [ big ] },
2627

2728
{ formatter: Globalize.numberFormatter( {
2829
minimumIntegerDigits: 2,
@@ -51,10 +52,12 @@ module.exports = {
5152
minimumSignificantDigits: 1,
5253
maximumSignificantDigits: 3
5354
} ), args: [ 0.00010001 ] },
54-
{ formatter: Globalize.numberFormatter( { useGrouping: false } ), args: [ 99999999.99 ] },
55+
{ formatter: Globalize.numberFormatter( { useGrouping: false } ), args: [ big ] },
5556

5657
{ formatter: Globalize.numberFormatter( { style: "percent" } ), args: [ Math.PI ] },
57-
{ formatter: Globalize( "ar" ).numberFormatter( { style: "percent" } ), args: [ Math.PI ] }
58+
{ formatter: Globalize( "ar" ).numberFormatter( { style: "percent" } ), args: [ Math.PI ] },
59+
{ formatter: Globalize.numberFormatter( { compact: "short" } ), args: [ big ] },
60+
{ formatter: Globalize.numberFormatter( { compact: "long" } ), args: [ big ] }
5861
];
5962
}
6063
};

0 commit comments

Comments
 (0)