@qrvey/utils 1.2.9-14 → 1.2.9-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/README.md +755 -652
  2. package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
  3. package/dist/cjs/filters/helpers/ui/index.d.ts +1 -0
  4. package/dist/cjs/filters/helpers/ui/index.js +1 -0
  5. package/dist/cjs/filters/helpers/ui/transformFilterValues.d.ts +4 -0
  6. package/dist/cjs/filters/helpers/ui/transformFilterValues.js +22 -0
  7. package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
  8. package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
  9. package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  10. package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +2 -0
  11. package/dist/cjs/filters/interfaces/ui/index.d.ts +3 -2
  12. package/dist/cjs/filters/interfaces/ui/index.js +3 -2
  13. package/dist/cjs/format/definition.d.ts +17 -0
  14. package/dist/cjs/format/definition.js +31 -1
  15. package/dist/cjs/format/format.d.ts +2 -1
  16. package/dist/cjs/format/format.js +8 -5
  17. package/dist/cjs/format/index.d.ts +1 -0
  18. package/dist/cjs/format/index.js +1 -0
  19. package/dist/cjs/format/localization.d.ts +3 -0
  20. package/dist/cjs/format/localization.js +56 -0
  21. package/dist/cjs/globalization/helpers/getI18nCalendar.d.ts +4 -0
  22. package/dist/cjs/globalization/helpers/getI18nCalendar.js +69 -0
  23. package/dist/cjs/globalization/helpers/index.d.ts +1 -0
  24. package/dist/cjs/globalization/helpers/index.js +1 -0
  25. package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
  26. package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.js +2 -0
  27. package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
  28. package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.js +2 -0
  29. package/dist/cjs/globalization/interfaces/calendar/index.d.ts +2 -0
  30. package/dist/cjs/globalization/interfaces/calendar/index.js +14 -0
  31. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
  32. package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  33. package/dist/cjs/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
  34. package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
  35. package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
  36. package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.js +2 -0
  37. package/dist/cjs/globalization/interfaces/index.d.ts +1 -0
  38. package/dist/cjs/globalization/interfaces/index.js +1 -0
  39. package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
  40. package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.js +10 -0
  41. package/dist/cjs/globalization/labels/calendar/index.d.ts +1 -0
  42. package/dist/cjs/globalization/labels/calendar/index.js +13 -0
  43. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +1 -1
  44. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +7 -5
  45. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
  46. package/dist/cjs/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
  47. package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +6 -0
  48. package/dist/cjs/globalization/labels/index.d.ts +1 -0
  49. package/dist/cjs/globalization/labels/index.js +1 -0
  50. package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
  51. package/dist/cjs/interfaces/format/IFormatConfig.Interface.js +2 -0
  52. package/dist/cjs/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
  53. package/dist/cjs/interfaces/format/IFormatCurrency.Interface.js +2 -0
  54. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
  55. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.js +2 -0
  56. package/dist/cjs/interfaces/format/index.d.ts +3 -0
  57. package/dist/cjs/interfaces/format/index.js +15 -0
  58. package/dist/cjs/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
  59. package/dist/cjs/interfaces/index.d.ts +1 -0
  60. package/dist/cjs/interfaces/index.js +1 -0
  61. package/dist/cjs/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
  62. package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +23 -0
  63. package/dist/cjs/qrvey/helpers/index.d.ts +2 -0
  64. package/dist/cjs/qrvey/helpers/index.js +2 -0
  65. package/dist/cjs/qrvey/helpers/transformValue.d.ts +8 -0
  66. package/dist/cjs/qrvey/helpers/transformValue.js +46 -0
  67. package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
  68. package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.js +2 -0
  69. package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
  70. package/dist/cjs/qrvey/interfaces/ITransformValueSettings.js +2 -0
  71. package/dist/cjs/qrvey/interfaces/index.d.ts +2 -0
  72. package/dist/cjs/qrvey/interfaces/index.js +2 -0
  73. package/dist/cjs/services/api/getDatasetColumns.api.js +5 -1
  74. package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
  75. package/dist/filters/helpers/ui/index.d.ts +1 -0
  76. package/dist/filters/helpers/ui/index.js +1 -0
  77. package/dist/filters/helpers/ui/transformFilterValues.d.ts +4 -0
  78. package/dist/filters/helpers/ui/transformFilterValues.js +18 -0
  79. package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
  80. package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
  81. package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  82. package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +1 -0
  83. package/dist/filters/interfaces/ui/index.d.ts +3 -2
  84. package/dist/filters/interfaces/ui/index.js +3 -2
  85. package/dist/format/definition.d.ts +17 -0
  86. package/dist/format/definition.js +30 -0
  87. package/dist/format/format.d.ts +2 -1
  88. package/dist/format/format.js +6 -3
  89. package/dist/format/index.d.ts +1 -0
  90. package/dist/format/index.js +1 -0
  91. package/dist/format/localization.d.ts +3 -0
  92. package/dist/format/localization.js +51 -0
  93. package/dist/globalization/helpers/getI18nCalendar.d.ts +4 -0
  94. package/dist/globalization/helpers/getI18nCalendar.js +65 -0
  95. package/dist/globalization/helpers/index.d.ts +1 -0
  96. package/dist/globalization/helpers/index.js +1 -0
  97. package/dist/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
  98. package/dist/globalization/interfaces/calendar/II18nCalendar.js +1 -0
  99. package/dist/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
  100. package/dist/globalization/interfaces/calendar/II18nCalendarProperties.js +1 -0
  101. package/dist/globalization/interfaces/calendar/index.d.ts +2 -0
  102. package/dist/globalization/interfaces/calendar/index.js +2 -0
  103. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
  104. package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  105. package/dist/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
  106. package/dist/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
  107. package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
  108. package/dist/globalization/interfaces/filters/II18nTokenBox.js +1 -0
  109. package/dist/globalization/interfaces/index.d.ts +1 -0
  110. package/dist/globalization/interfaces/index.js +1 -0
  111. package/dist/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
  112. package/dist/globalization/labels/calendar/I18N_CALENDAR.js +7 -0
  113. package/dist/globalization/labels/calendar/index.d.ts +1 -0
  114. package/dist/globalization/labels/calendar/index.js +1 -0
  115. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +1 -1
  116. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +7 -5
  117. package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
  118. package/dist/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
  119. package/dist/globalization/labels/filters/I18N_FILTER.js +6 -0
  120. package/dist/globalization/labels/index.d.ts +1 -0
  121. package/dist/globalization/labels/index.js +1 -0
  122. package/dist/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
  123. package/dist/interfaces/format/IFormatConfig.Interface.js +1 -0
  124. package/dist/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
  125. package/dist/interfaces/format/IFormatCurrency.Interface.js +1 -0
  126. package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
  127. package/dist/interfaces/format/IFormatOutputFormat.Interface.js +1 -0
  128. package/dist/interfaces/format/index.d.ts +3 -0
  129. package/dist/interfaces/format/index.js +3 -0
  130. package/dist/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
  131. package/dist/interfaces/index.d.ts +1 -0
  132. package/dist/interfaces/index.js +1 -0
  133. package/dist/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
  134. package/dist/qrvey/helpers/getValueWithSuffixes.js +19 -0
  135. package/dist/qrvey/helpers/index.d.ts +2 -0
  136. package/dist/qrvey/helpers/index.js +2 -0
  137. package/dist/qrvey/helpers/transformValue.d.ts +8 -0
  138. package/dist/qrvey/helpers/transformValue.js +42 -0
  139. package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
  140. package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.js +1 -0
  141. package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
  142. package/dist/qrvey/interfaces/ITransformValueSettings.js +1 -0
  143. package/dist/qrvey/interfaces/index.d.ts +2 -0
  144. package/dist/qrvey/interfaces/index.js +2 -0
  145. package/dist/services/api/getDatasetColumns.api.js +5 -1
  146. package/package.json +1 -1
  147. package/src/filters/helpers/builder/getFilterBuilderGeneralConfig.ts +1 -0
  148. package/src/filters/helpers/ui/index.ts +1 -0
  149. package/src/filters/helpers/ui/transformFilterValues.ts +29 -0
  150. package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +2 -1
  151. package/src/filters/interfaces/panel/IFilterPanelConfig.ts +1 -0
  152. package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +7 -0
  153. package/src/filters/interfaces/ui/index.ts +3 -2
  154. package/src/format/definition.ts +45 -0
  155. package/src/format/format.ts +19 -15
  156. package/src/format/index.ts +1 -0
  157. package/src/format/localization.ts +52 -0
  158. package/src/globalization/helpers/getI18nCalendar.ts +68 -0
  159. package/src/globalization/helpers/index.ts +1 -0
  160. package/src/globalization/interfaces/calendar/II18nCalendar.ts +7 -0
  161. package/src/globalization/interfaces/calendar/II18nCalendarProperties.ts +9 -0
  162. package/src/globalization/interfaces/calendar/index.ts +2 -0
  163. package/src/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.ts +5 -3
  164. package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
  165. package/src/globalization/interfaces/common/II18nDayNames.ts +8 -0
  166. package/src/globalization/interfaces/filters/II18nFilter.ts +2 -0
  167. package/src/globalization/interfaces/filters/II18nTokenBox.ts +6 -0
  168. package/src/globalization/interfaces/index.ts +1 -0
  169. package/src/globalization/labels/calendar/I18N_CALENDAR.ts +9 -0
  170. package/src/globalization/labels/calendar/index.ts +1 -0
  171. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.ts +1 -1
  172. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +8 -6
  173. package/src/globalization/labels/common/I18N_COMMON.ts +2 -0
  174. package/src/globalization/labels/common/I18N_DAY_NAMES.ts +8 -0
  175. package/src/globalization/labels/filters/I18N_FILTER.ts +6 -0
  176. package/src/globalization/labels/index.ts +1 -0
  177. package/src/interfaces/format/IFormatConfig.Interface.ts +5 -0
  178. package/src/interfaces/format/IFormatCurrency.Interface.ts +4 -0
  179. package/src/interfaces/format/IFormatOutputFormat.Interface.ts +9 -0
  180. package/src/interfaces/format/index.ts +3 -0
  181. package/src/interfaces/general/IGeneralWidgetConfig.ts +2 -0
  182. package/src/interfaces/index.ts +1 -0
  183. package/src/qrvey/helpers/getValueWithSuffixes.ts +19 -0
  184. package/src/qrvey/helpers/index.ts +2 -0
  185. package/src/qrvey/helpers/transformValue.ts +47 -0
  186. package/src/qrvey/interfaces/IGetValueWithSuffixesSettings.ts +12 -0
  187. package/src/qrvey/interfaces/ITransformValueSettings.ts +12 -0
  188. package/src/qrvey/interfaces/index.ts +2 -0
  189. package/src/services/api/getDatasetColumns.api.ts +4 -1
  190. package/test/columns/isNumericalColumn.test.js +154 -0
  191. package/test/format.test.js +11 -11
@@ -0,0 +1,154 @@
1
+ const { COLUMN, FORMULA, isNumericalColumn } = require("../../dist/cjs");
2
+
3
+ const column1 = {
4
+ id: '123',
5
+ qrveyid: 'abc',
6
+ type: COLUMN.NUMERIC
7
+ };
8
+
9
+ const column2 = {
10
+ id: '222',
11
+ qrveyid: 'abc',
12
+ type: COLUMN.RATING
13
+ };
14
+
15
+ const column3 = {
16
+ id: '333',
17
+ qrveyid: 'abc',
18
+ type: COLUMN.SLIDEBAR
19
+ };
20
+
21
+ const column4 = {
22
+ formulaid: '456',
23
+ formulaType: FORMULA.NUMBER,
24
+ id: '456',
25
+ qrveyid: 'abc',
26
+ type: COLUMN.FORMULA
27
+ };
28
+
29
+ const wrongColumn1 = {
30
+ formulaid: '456',
31
+ formulaType: FORMULA.DATE,
32
+ id: '494',
33
+ qrveyid: 'abc',
34
+ type: COLUMN.FORMULA
35
+ };
36
+
37
+ const wrongColumn2 = {
38
+ id: '789',
39
+ qrveyid: 'abc',
40
+ type: COLUMN.TEXTFIELD
41
+ };
42
+
43
+ describe('Testing undefined/empty arguments', function () {
44
+ const empty1 = undefined;
45
+ const empty2 = null;
46
+ const empty3 = '';
47
+ const empty4 = [];
48
+ const empty5 = {};
49
+
50
+ test('no argument passed', function () {
51
+ const validation = isNumericalColumn();
52
+ expect(validation).toBeFalsy();
53
+ });
54
+
55
+ test('Undefined argument', function () {
56
+ const validation = isNumericalColumn(empty1);
57
+ expect(validation).toBeFalsy();
58
+ });
59
+
60
+ test('Null argument', function () {
61
+ const validation = isNumericalColumn(empty2);
62
+ expect(validation).toBeFalsy();
63
+ });
64
+
65
+ test('Empty string argument', function () {
66
+ const validation = isNumericalColumn(empty3);
67
+ expect(validation).toBeFalsy();
68
+ });
69
+
70
+ test('Empty array argument', function () {
71
+ const validation = isNumericalColumn(empty4);
72
+ expect(validation).toBeFalsy();
73
+ });
74
+
75
+ test('Empty object argument', function () {
76
+ const validation = isNumericalColumn(empty5);
77
+ expect(validation).toBeFalsy();
78
+ });
79
+ });
80
+
81
+ describe('Testing no-object arguments', function () {
82
+ const variable1 = 1;
83
+ const variable2 = false;
84
+ const variable3 = new Date();
85
+ const variable4 = ['Hello', 'World'];
86
+ const variable5 = (num1 = 1, num2 = 2) => num1 + num2;
87
+
88
+ test('Numeric variable', function () {
89
+ const validation = isNumericalColumn(variable1);
90
+ expect(validation).toBeFalsy();
91
+ });
92
+
93
+ test('Boolean variable', function () {
94
+ const validation = isNumericalColumn(variable2);
95
+ expect(validation).toBeFalsy();
96
+ });
97
+
98
+ test('Date object variable', function () {
99
+ const validation = isNumericalColumn(variable3);
100
+ expect(validation).toBeFalsy();
101
+ });
102
+
103
+ test('Array variable', function () {
104
+ const validation = isNumericalColumn(variable4);
105
+ expect(validation).toBeFalsy();
106
+ });
107
+
108
+ test('Function-like variable', function () {
109
+ const validation = isNumericalColumn(variable5);
110
+ expect(validation).toBeFalsy();
111
+ });
112
+ });
113
+
114
+ describe('Testing invalid expected object', function () {
115
+ const variable1 = { tag1: 'value1', tag2: 'value2' };
116
+
117
+ test('Different expected object', function () {
118
+ const validation = isNumericalColumn(variable1);
119
+ expect(validation).toBeFalsy();
120
+ });
121
+
122
+ test('Different column type 2', function () {
123
+ const validation = isNumericalColumn(wrongColumn1);
124
+ expect(validation).toBeFalsy();
125
+ });
126
+
127
+ test('Different column type 1', function () {
128
+ const validation = isNumericalColumn(wrongColumn2);
129
+ expect(validation).toBeFalsy();
130
+ });
131
+ });
132
+
133
+ describe('Regular scenarios', function () {
134
+ test('Scenario #1 - Numeric column type', function () {
135
+ const validation = isNumericalColumn(column1);
136
+ expect(validation).toBeTruthy();
137
+ });
138
+
139
+ test('Scenario #2 - Rating column type', function () {
140
+ const validation = isNumericalColumn(column2);
141
+ expect(validation).toBeTruthy();
142
+ });
143
+
144
+ test('Scenario #4 - Slidebar column type', function () {
145
+ const validation = isNumericalColumn(column3);
146
+ expect(validation).toBeTruthy();
147
+ });
148
+
149
+ test('Scenario #4 - Formula column type with a number type', function () {
150
+ const validation = isNumericalColumn(column4);
151
+ expect(validation).toBeTruthy();
152
+ });
153
+
154
+ });
@@ -1,29 +1,29 @@
1
- const { formatValue, defineFormat, formatAbbreviated } = require('../dist/cjs');
1
+ const { addFormat, defineFormat, formatAbbreviated } = require('../dist/cjs');
2
2
 
3
3
  describe('Testing format util', function () {
4
4
  test('Number formats', function () {
5
- const abbreviated = formatValue('1000000', {
5
+ const abbreviated = addFormat('1000000', {
6
6
  "type": "NUMERIC",
7
7
  "format": "Abbreviated",
8
8
  "decimals": "3"
9
9
  });
10
10
  expect(abbreviated).toEqual('1.00M');
11
11
 
12
- const numeric = formatValue('1000000', {
12
+ const numeric = addFormat('1000000', {
13
13
  "type": "NUMERIC",
14
14
  "format": "Numeric",
15
15
  "decimals": "3"
16
16
  });
17
17
  expect(numeric).toEqual('1,000,000.000');
18
18
 
19
- const currency = formatValue('1000000', {
19
+ const currency = addFormat('1000000', {
20
20
  "type": "NUMERIC",
21
21
  "format": "Currency",
22
22
  "decimals": "3"
23
23
  });
24
24
  expect(currency).toEqual(' $1,000,000.000');
25
25
 
26
- const percentage = formatValue('1000000', {
26
+ const percentage = addFormat('1000000', {
27
27
  "type": "NUMERIC",
28
28
  "format": "Percentage",
29
29
  "decimals": "3"
@@ -32,31 +32,31 @@ describe('Testing format util', function () {
32
32
  });
33
33
 
34
34
  test('Date formats', function () {
35
- const yyyyMMdd = formatValue('2021-08-06', {
35
+ const yyyyMMdd = addFormat('2021-08-06', {
36
36
  "type": "DATE",
37
37
  "format": "MM/DD/YYYY HH24:MM:SS"
38
38
  });
39
39
  expect(yyyyMMdd).toEqual('08/06/2021 00:00:00');
40
40
 
41
- const yyyyMMddHHmmSS = formatValue('2021-08-06 05:30:50', {
41
+ const yyyyMMddHHmmSS = addFormat('2021-08-06 05:30:50', {
42
42
  "type": "DATE",
43
43
  "format": "MM/DD/YYYY HH24:MM:SS"
44
44
  });
45
45
  expect(yyyyMMddHHmmSS).toEqual('08/06/2021 05:30:50');
46
46
 
47
- const ISOFormat = formatValue('2021-06-09T13:15:46', {
47
+ const ISOFormat = addFormat('2021-06-09T13:15:46', {
48
48
  "type": "DATE",
49
49
  "format": "MM/DD/YYYY hh:MM:SS"
50
50
  });
51
51
  expect(ISOFormat).toEqual('06/09/2021 01:15:46');
52
52
 
53
- const ISOFormatRandom = formatValue('2021-06-09T13:15:46', {
53
+ const ISOFormatRandom = addFormat('2021-06-09T13:15:46', {
54
54
  "type": "DATE",
55
55
  "format": "MM YYYY H M s"
56
56
  });
57
57
  expect(ISOFormatRandom).toEqual('06 2021 13 6 46');
58
58
 
59
- const ISOFormatRandom1 = formatValue('2018-01-01T00:00:00', {
59
+ const ISOFormatRandom1 = addFormat('2018-01-01T00:00:00', {
60
60
  "type": "DATE",
61
61
  "format": "Q MMMM Do ddd"
62
62
  });
@@ -336,7 +336,7 @@ describe('Define format tests', function () {
336
336
 
337
337
  const format = defineFormat(column, true);
338
338
  expect(format).toEqual({ type: 'NUMERIC', format: 'Currency', decimals: '3' });
339
- const currency = formatValue('1000000', format);
339
+ const currency = addFormat('1000000', format);
340
340
  expect(currency).toEqual(' $1,000,000.000');
341
341
  });
342
342