@oanda/labs-currency-power-balance-widget 1.0.111 → 1.0.113

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 (119) hide show
  1. package/CHANGELOG.md +908 -0
  2. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js +9 -10
  3. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
  4. package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +14 -19
  5. package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
  6. package/dist/main/CurrencyPowerBalanceWidget/Main.js +11 -11
  7. package/dist/main/CurrencyPowerBalanceWidget/Main.js.map +1 -1
  8. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js +12 -12
  9. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
  10. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -1
  11. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -1
  12. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +1 -1
  13. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
  14. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -1
  15. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -1
  16. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/utils.js.map +1 -1
  17. package/dist/main/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -1
  18. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +4 -4
  19. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
  20. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +11 -12
  21. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
  22. package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -1
  23. package/dist/main/CurrencyPowerBalanceWidget/config.js.map +1 -1
  24. package/dist/main/CurrencyPowerBalanceWidget/constants.js.map +1 -1
  25. package/dist/main/CurrencyPowerBalanceWidget/render.js +8 -8
  26. package/dist/main/CurrencyPowerBalanceWidget/render.js.map +1 -1
  27. package/dist/main/CurrencyPowerBalanceWidget/types.js.map +1 -1
  28. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  29. package/dist/main/gql/types/gql.js +1 -1
  30. package/dist/main/gql/types/gql.js.map +1 -1
  31. package/dist/main/gql/types/graphql.js +64 -64
  32. package/dist/main/gql/types/graphql.js.map +1 -1
  33. package/dist/main/gql/types/index.js.map +1 -1
  34. package/dist/main/translations/index.js +1 -1
  35. package/dist/main/translations/index.js.map +1 -1
  36. package/dist/main/translations/translations.js.map +1 -1
  37. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js +8 -8
  38. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
  39. package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +15 -20
  40. package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
  41. package/dist/module/CurrencyPowerBalanceWidget/Main.js +12 -12
  42. package/dist/module/CurrencyPowerBalanceWidget/Main.js.map +1 -1
  43. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js +11 -11
  44. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
  45. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js +1 -1
  46. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -1
  47. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js +2 -2
  48. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -1
  49. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +2 -2
  50. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
  51. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -1
  52. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -1
  53. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/utils.js.map +1 -1
  54. package/dist/module/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -1
  55. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +4 -4
  56. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
  57. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +11 -11
  58. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
  59. package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -1
  60. package/dist/module/CurrencyPowerBalanceWidget/config.js.map +1 -1
  61. package/dist/module/CurrencyPowerBalanceWidget/constants.js.map +1 -1
  62. package/dist/module/CurrencyPowerBalanceWidget/render.js +8 -8
  63. package/dist/module/CurrencyPowerBalanceWidget/render.js.map +1 -1
  64. package/dist/module/CurrencyPowerBalanceWidget/types.js.map +1 -1
  65. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  66. package/dist/module/gql/types/gql.js +1 -1
  67. package/dist/module/gql/types/gql.js.map +1 -1
  68. package/dist/module/gql/types/graphql.js +64 -64
  69. package/dist/module/gql/types/graphql.js.map +1 -1
  70. package/dist/module/gql/types/index.js +2 -2
  71. package/dist/module/gql/types/index.js.map +1 -1
  72. package/dist/module/translations/index.js +1 -1
  73. package/dist/module/translations/index.js.map +1 -1
  74. package/dist/module/translations/translations.js.map +1 -1
  75. package/dist/types/CurrencyPowerBalanceWidget/ChartWithData.d.ts +1 -1
  76. package/dist/types/CurrencyPowerBalanceWidget/CurrencyPowerBalance.d.ts +1 -1
  77. package/dist/types/CurrencyPowerBalanceWidget/Main.d.ts +1 -1
  78. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/Chart.d.ts +1 -1
  79. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/constants.d.ts +1 -1
  80. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/formatters.d.ts +4 -3
  81. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getOption.d.ts +2 -1
  82. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/utils.d.ts +1 -1
  83. package/dist/types/CurrencyPowerBalanceWidget/components/Chart/types.d.ts +1 -1
  84. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.d.ts +1 -1
  85. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.d.ts +1 -1
  86. package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.d.ts +3 -3
  87. package/dist/types/CurrencyPowerBalanceWidget/types.d.ts +2 -2
  88. package/dist/types/gql/types/gql.d.ts +2 -2
  89. package/dist/types/gql/types/index.d.ts +2 -2
  90. package/dist/types/translations/index.d.ts +2 -2
  91. package/package.json +3 -3
  92. package/src/CurrencyPowerBalanceWidget/ChartWithData.tsx +32 -18
  93. package/src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx +26 -23
  94. package/src/CurrencyPowerBalanceWidget/Main.tsx +20 -11
  95. package/src/CurrencyPowerBalanceWidget/components/Chart/Chart.tsx +26 -21
  96. package/src/CurrencyPowerBalanceWidget/components/Chart/options/constants.ts +11 -10
  97. package/src/CurrencyPowerBalanceWidget/components/Chart/options/formatters.ts +42 -22
  98. package/src/CurrencyPowerBalanceWidget/components/Chart/options/getOption.ts +59 -44
  99. package/src/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.ts +7 -4
  100. package/src/CurrencyPowerBalanceWidget/components/Chart/options/types.ts +1 -1
  101. package/src/CurrencyPowerBalanceWidget/components/Chart/options/utils.ts +10 -9
  102. package/src/CurrencyPowerBalanceWidget/components/Chart/types.ts +4 -1
  103. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.tsx +21 -15
  104. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.tsx +48 -38
  105. package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.ts +3 -3
  106. package/src/CurrencyPowerBalanceWidget/config.ts +8 -2
  107. package/src/CurrencyPowerBalanceWidget/constants.ts +2 -1
  108. package/src/CurrencyPowerBalanceWidget/render.tsx +24 -20
  109. package/src/CurrencyPowerBalanceWidget/types.ts +5 -3
  110. package/src/gql/types/fragment-masking.ts +41 -21
  111. package/src/gql/types/gql.ts +7 -3
  112. package/src/gql/types/graphql.ts +117 -44
  113. package/src/gql/types/index.ts +2 -2
  114. package/src/translations/index.ts +4 -4
  115. package/src/translations/translations.ts +2 -1
  116. package/test/Main.test.tsx +39 -25
  117. package/test/chartFormatters.test.ts +84 -24
  118. package/test/responsesMocks.ts +254 -255
  119. package/test/utils.test.ts +0 -1
@@ -1,261 +1,260 @@
1
1
  import { getCurrencyPowerBalance } from '../src/gql/getCurrencyPowerBalance';
2
2
 
3
- const mockResponse = [{
4
- request: {
5
- query: getCurrencyPowerBalance,
6
- variables: {
7
- timeUnit: 'CURRENT_DAY',
3
+ const mockResponse = [
4
+ {
5
+ request: {
6
+ query: getCurrencyPowerBalance,
7
+ variables: {
8
+ timeUnit: 'CURRENT_DAY',
9
+ },
8
10
  },
9
- },
10
- result: {
11
- data: {
12
- currencyPowerBalance: [
13
- {
14
- currency: 'NZD',
15
- power: [
16
- {
17
- point: '2023-10-26T22:00:00Z',
18
- price: 3.86,
19
- },
20
- {
21
- point: '2023-10-27T02:00:00Z',
22
- price: 3.04,
23
- },
24
- {
25
- point: '2023-10-27T06:00:00Z',
26
- price: 3.84,
27
- },
28
- {
29
- point: '2023-10-27T10:00:00Z',
30
- price: 4.65,
31
- },
32
- {
33
- point: '2023-10-27T14:00:00Z',
34
- price: 2.43,
35
- },
36
- {
37
- point: '2023-10-27T18:00:00Z',
38
- price: 1.65,
39
- },
40
- ],
41
- updatedAt: '2023-10-28T00:00:29.250105730Z',
42
- },
43
- {
44
- currency: 'CHF',
45
- power: [
46
- {
47
- point: '2023-10-26T22:00:00Z',
48
- price: -5.62,
49
- },
50
- {
51
- point: '2023-10-27T02:00:00Z',
52
- price: -5.57,
53
- },
54
- {
55
- point: '2023-10-27T06:00:00Z',
56
- price: -7.7,
57
- },
58
- {
59
- point: '2023-10-27T10:00:00Z',
60
- price: -8.75,
61
- },
62
- {
63
- point: '2023-10-27T14:00:00Z',
64
- price: -10.33,
65
- },
66
- {
67
- point: '2023-10-27T18:00:00Z',
68
- price: -9.15,
69
- },
70
- ],
71
- updatedAt: '2023-10-28T00:00:29.250105730Z',
72
- },
73
- {
74
- currency: 'AUD',
75
- power: [
76
- {
77
- point: '2023-10-26T22:00:00Z',
78
- price: 3.8,
79
- },
80
- {
81
- point: '2023-10-27T02:00:00Z',
82
- price: 3.08,
83
- },
84
- {
85
- point: '2023-10-27T06:00:00Z',
86
- price: 3.37,
87
- },
88
- {
89
- point: '2023-10-27T10:00:00Z',
90
- price: 3.51,
91
- },
92
- {
93
- point: '2023-10-27T14:00:00Z',
94
- price: 3.91,
95
- },
96
- {
97
- point: '2023-10-27T18:00:00Z',
98
- price: 4.31,
99
- },
100
- ],
101
- updatedAt: '2023-10-28T00:00:29.250105730Z',
102
- },
103
- {
104
- currency: 'CAD',
105
- power: [
106
- {
107
- point: '2023-10-26T22:00:00Z',
108
- price: -6.41,
109
- },
110
- {
111
- point: '2023-10-27T02:00:00Z',
112
- price: -5.54,
113
- },
114
- {
115
- point: '2023-10-27T06:00:00Z',
116
- price: -4.95,
117
- },
118
- {
119
- point: '2023-10-27T10:00:00Z',
120
- price: -6.56,
121
- },
122
- {
123
- point: '2023-10-27T14:00:00Z',
124
- price: -9.63,
125
- },
126
- {
127
- point: '2023-10-27T18:00:00Z',
128
- price: -9.75,
129
- },
130
- ],
131
- updatedAt: '2023-10-28T00:00:29.250105730Z',
132
- },
133
- {
134
- currency: 'EUR',
135
- power: [
136
- {
137
- point: '2023-10-26T22:00:00Z',
138
- price: -0.01,
139
- },
140
- {
141
- point: '2023-10-27T02:00:00Z',
142
- price: 0.27,
143
- },
144
- {
145
- point: '2023-10-27T06:00:00Z',
146
- price: -0.01,
147
- },
148
- {
149
- point: '2023-10-27T10:00:00Z',
150
- price: -0.52,
151
- },
152
- {
153
- point: '2023-10-27T14:00:00Z',
154
- price: 2.81,
155
- },
156
- {
157
- point: '2023-10-27T18:00:00Z',
158
- price: 1.4,
159
- },
160
- ],
161
- updatedAt: '2023-10-28T00:00:29.250105730Z',
162
- },
163
- {
164
- currency: 'JPY',
165
- power: [
166
- {
167
- point: '2023-10-26T22:00:00Z',
168
- price: -0.24,
169
- },
170
- {
171
- point: '2023-10-27T02:00:00Z',
172
- price: 0.58,
173
- },
174
- {
175
- point: '2023-10-27T06:00:00Z',
176
- price: 1.59,
177
- },
178
- {
179
- point: '2023-10-27T10:00:00Z',
180
- price: 3.29,
181
- },
182
- {
183
- point: '2023-10-27T14:00:00Z',
184
- price: 5.54,
185
- },
186
- {
187
- point: '2023-10-27T18:00:00Z',
188
- price: 6.27,
189
- },
190
- ],
191
- updatedAt: '2023-10-28T00:00:29.250105730Z',
192
- },
193
- {
194
- currency: 'USD',
195
- power: [
196
- {
197
- point: '2023-10-26T22:00:00Z',
198
- price: 3.8,
199
- },
200
- {
201
- point: '2023-10-27T02:00:00Z',
202
- price: 3.08,
203
- },
204
- {
205
- point: '2023-10-27T06:00:00Z',
206
- price: 3.37,
207
- },
208
- {
209
- point: '2023-10-27T10:00:00Z',
210
- price: 3.51,
211
- },
212
- {
213
- point: '2023-10-27T14:00:00Z',
214
- price: 3.91,
215
- },
216
- {
217
- point: '2023-10-27T18:00:00Z',
218
- price: 4.31,
219
- },
220
- ],
221
- updatedAt: '2023-10-28T00:00:29.250105730Z',
222
- },
223
- {
224
- currency: 'GBP',
225
- power: [
226
- {
227
- point: '2023-10-26T22:00:00Z',
228
- price: 1.8,
229
- },
230
- {
231
- point: '2023-10-27T02:00:00Z',
232
- price: 1.08,
233
- },
234
- {
235
- point: '2023-10-27T06:00:00Z',
236
- price: 1.37,
237
- },
238
- {
239
- point: '2023-10-27T10:00:00Z',
240
- price: 1.51,
241
- },
242
- {
243
- point: '2023-10-27T14:00:00Z',
244
- price: 1.91,
245
- },
246
- {
247
- point: '2023-10-27T18:00:00Z',
248
- price: 1.31,
249
-
250
- },
251
- ],
252
- updatedAt: '2023-10-28T00:00:29.250105730Z',
253
- },
254
- ],
11
+ result: {
12
+ data: {
13
+ currencyPowerBalance: [
14
+ {
15
+ currency: 'NZD',
16
+ power: [
17
+ {
18
+ point: '2023-10-26T22:00:00Z',
19
+ price: 3.86,
20
+ },
21
+ {
22
+ point: '2023-10-27T02:00:00Z',
23
+ price: 3.04,
24
+ },
25
+ {
26
+ point: '2023-10-27T06:00:00Z',
27
+ price: 3.84,
28
+ },
29
+ {
30
+ point: '2023-10-27T10:00:00Z',
31
+ price: 4.65,
32
+ },
33
+ {
34
+ point: '2023-10-27T14:00:00Z',
35
+ price: 2.43,
36
+ },
37
+ {
38
+ point: '2023-10-27T18:00:00Z',
39
+ price: 1.65,
40
+ },
41
+ ],
42
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
43
+ },
44
+ {
45
+ currency: 'CHF',
46
+ power: [
47
+ {
48
+ point: '2023-10-26T22:00:00Z',
49
+ price: -5.62,
50
+ },
51
+ {
52
+ point: '2023-10-27T02:00:00Z',
53
+ price: -5.57,
54
+ },
55
+ {
56
+ point: '2023-10-27T06:00:00Z',
57
+ price: -7.7,
58
+ },
59
+ {
60
+ point: '2023-10-27T10:00:00Z',
61
+ price: -8.75,
62
+ },
63
+ {
64
+ point: '2023-10-27T14:00:00Z',
65
+ price: -10.33,
66
+ },
67
+ {
68
+ point: '2023-10-27T18:00:00Z',
69
+ price: -9.15,
70
+ },
71
+ ],
72
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
73
+ },
74
+ {
75
+ currency: 'AUD',
76
+ power: [
77
+ {
78
+ point: '2023-10-26T22:00:00Z',
79
+ price: 3.8,
80
+ },
81
+ {
82
+ point: '2023-10-27T02:00:00Z',
83
+ price: 3.08,
84
+ },
85
+ {
86
+ point: '2023-10-27T06:00:00Z',
87
+ price: 3.37,
88
+ },
89
+ {
90
+ point: '2023-10-27T10:00:00Z',
91
+ price: 3.51,
92
+ },
93
+ {
94
+ point: '2023-10-27T14:00:00Z',
95
+ price: 3.91,
96
+ },
97
+ {
98
+ point: '2023-10-27T18:00:00Z',
99
+ price: 4.31,
100
+ },
101
+ ],
102
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
103
+ },
104
+ {
105
+ currency: 'CAD',
106
+ power: [
107
+ {
108
+ point: '2023-10-26T22:00:00Z',
109
+ price: -6.41,
110
+ },
111
+ {
112
+ point: '2023-10-27T02:00:00Z',
113
+ price: -5.54,
114
+ },
115
+ {
116
+ point: '2023-10-27T06:00:00Z',
117
+ price: -4.95,
118
+ },
119
+ {
120
+ point: '2023-10-27T10:00:00Z',
121
+ price: -6.56,
122
+ },
123
+ {
124
+ point: '2023-10-27T14:00:00Z',
125
+ price: -9.63,
126
+ },
127
+ {
128
+ point: '2023-10-27T18:00:00Z',
129
+ price: -9.75,
130
+ },
131
+ ],
132
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
133
+ },
134
+ {
135
+ currency: 'EUR',
136
+ power: [
137
+ {
138
+ point: '2023-10-26T22:00:00Z',
139
+ price: -0.01,
140
+ },
141
+ {
142
+ point: '2023-10-27T02:00:00Z',
143
+ price: 0.27,
144
+ },
145
+ {
146
+ point: '2023-10-27T06:00:00Z',
147
+ price: -0.01,
148
+ },
149
+ {
150
+ point: '2023-10-27T10:00:00Z',
151
+ price: -0.52,
152
+ },
153
+ {
154
+ point: '2023-10-27T14:00:00Z',
155
+ price: 2.81,
156
+ },
157
+ {
158
+ point: '2023-10-27T18:00:00Z',
159
+ price: 1.4,
160
+ },
161
+ ],
162
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
163
+ },
164
+ {
165
+ currency: 'JPY',
166
+ power: [
167
+ {
168
+ point: '2023-10-26T22:00:00Z',
169
+ price: -0.24,
170
+ },
171
+ {
172
+ point: '2023-10-27T02:00:00Z',
173
+ price: 0.58,
174
+ },
175
+ {
176
+ point: '2023-10-27T06:00:00Z',
177
+ price: 1.59,
178
+ },
179
+ {
180
+ point: '2023-10-27T10:00:00Z',
181
+ price: 3.29,
182
+ },
183
+ {
184
+ point: '2023-10-27T14:00:00Z',
185
+ price: 5.54,
186
+ },
187
+ {
188
+ point: '2023-10-27T18:00:00Z',
189
+ price: 6.27,
190
+ },
191
+ ],
192
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
193
+ },
194
+ {
195
+ currency: 'USD',
196
+ power: [
197
+ {
198
+ point: '2023-10-26T22:00:00Z',
199
+ price: 3.8,
200
+ },
201
+ {
202
+ point: '2023-10-27T02:00:00Z',
203
+ price: 3.08,
204
+ },
205
+ {
206
+ point: '2023-10-27T06:00:00Z',
207
+ price: 3.37,
208
+ },
209
+ {
210
+ point: '2023-10-27T10:00:00Z',
211
+ price: 3.51,
212
+ },
213
+ {
214
+ point: '2023-10-27T14:00:00Z',
215
+ price: 3.91,
216
+ },
217
+ {
218
+ point: '2023-10-27T18:00:00Z',
219
+ price: 4.31,
220
+ },
221
+ ],
222
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
223
+ },
224
+ {
225
+ currency: 'GBP',
226
+ power: [
227
+ {
228
+ point: '2023-10-26T22:00:00Z',
229
+ price: 1.8,
230
+ },
231
+ {
232
+ point: '2023-10-27T02:00:00Z',
233
+ price: 1.08,
234
+ },
235
+ {
236
+ point: '2023-10-27T06:00:00Z',
237
+ price: 1.37,
238
+ },
239
+ {
240
+ point: '2023-10-27T10:00:00Z',
241
+ price: 1.51,
242
+ },
243
+ {
244
+ point: '2023-10-27T14:00:00Z',
245
+ price: 1.91,
246
+ },
247
+ {
248
+ point: '2023-10-27T18:00:00Z',
249
+ price: 1.31,
250
+ },
251
+ ],
252
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
253
+ },
254
+ ],
255
+ },
255
256
  },
256
257
  },
257
- }];
258
+ ];
258
259
 
259
- export {
260
- mockResponse,
261
- };
260
+ export { mockResponse };
@@ -26,7 +26,6 @@ describe('findLastIndexesBeforeWeekend', () => {
26
26
  1680816000000, // Thursday
27
27
  1680902400000, // Friday
28
28
  1681161600000, // Monday
29
-
30
29
  ];
31
30
  const expected = [4, 9];
32
31
  expect(findLastIndexesBeforeWeekend(timestamps)).toEqual(expected);