@futdevpro/fsm-dynamo 1.9.9 → 1.9.12
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.
- package/.github/workflows/main.yml +196 -0
- package/HOWTO.md +15 -15
- package/README.md +17 -17
- package/build/_collections/constants/country-divisions.const.d.ts +1 -1
- package/build/_collections/constants/country-divisions.const.d.ts.map +1 -1
- package/build/_collections/constants/country-divisions.const.js +2 -2
- package/build/_collections/constants/country-divisions.const.js.map +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts.map +1 -1
- package/build/_collections/constants/courtry-isos.const.js +2 -2
- package/build/_collections/constants/courtry-isos.const.js.map +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts.map +1 -1
- package/build/_collections/constants/module-settings/usage-module-settings.const.js +1 -1
- package/build/_collections/constants/pipe-transforms.const.js +12 -12
- package/build/_collections/constants/pipe-transforms.const.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts +2 -2
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js +11 -11
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js.map +1 -1
- package/build/_collections/utils/regions.util.d.ts.map +1 -1
- package/build/_collections/utils/regions.util.js +3 -0
- package/build/_collections/utils/regions.util.js.map +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts.map +1 -1
- package/build/_enums/range-pipe-setting.enum.js +12 -12
- package/build/_enums/range-pipe-setting.enum.js.map +1 -1
- package/build/_models/control-models/error.control-model.js +1 -1
- package/build/_models/control-models/error.control-model.js.map +1 -1
- package/build/_models/control-models/error.control-model.spec.js +25 -6
- package/build/_models/control-models/error.control-model.spec.js.map +1 -1
- package/build/_models/interfaces/index.d.ts +3 -0
- package/build/_models/interfaces/index.d.ts.map +1 -1
- package/build/_models/interfaces/index.js +3 -0
- package/build/_models/interfaces/index.js.map +1 -1
- package/build/_models/interfaces/pipe-transforms.interface.d.ts +2 -2
- package/build/_models/interfaces/pipe-transforms.interface.d.ts.map +1 -1
- package/futdevpro-fsm-dynamo-01.09.12.tgz +0 -0
- package/nodemon.json +11 -11
- package/package.json +151 -151
- package/src/_collections/assets/location/country-codes-ISO-3166.json +3239 -3239
- package/src/_collections/assets/location/country-divisions-ISO-3166-all-list.json +19035 -19035
- package/src/_collections/assets/location/country-divisions-ISO-3166.json +4993 -4993
- package/src/_collections/assets/location/country-phone-codes.json +1203 -1203
- package/src/_collections/constants/country-divisions.const.ts +9 -9
- package/src/_collections/constants/courtry-isos.const.ts +8 -8
- package/src/_collections/constants/error-defaults.const.ts +11 -11
- package/src/_collections/constants/index.ts +15 -15
- package/src/_collections/constants/module-settings/custom-data-module-settings.const.ts +15 -15
- package/src/_collections/constants/module-settings/index.ts +8 -8
- package/src/_collections/constants/module-settings/test-module-settings.const.ts +19 -19
- package/src/_collections/constants/module-settings/usage-module-settings.const.ts +19 -19
- package/src/_collections/constants/pipe-transforms.const.ts +35 -35
- package/src/_collections/constants/times.const.ts +8 -8
- package/src/_collections/index.ts +6 -6
- package/src/_collections/utils/array.util.spec.ts +39 -39
- package/src/_collections/utils/array.util.ts +137 -137
- package/src/_collections/utils/index.ts +18 -18
- package/src/_collections/utils/location.util.ts +55 -55
- package/src/_collections/utils/log.util.ts +239 -239
- package/src/_collections/utils/math/box-bounds.util.ts +85 -85
- package/src/_collections/utils/math/index.ts +5 -5
- package/src/_collections/utils/math/math.util.ts +53 -53
- package/src/_collections/utils/math/random.util.ts +80 -80
- package/src/_collections/utils/math/trigonometry.util.ts +73 -73
- package/src/_collections/utils/math/vector2.util.ts +197 -197
- package/src/_collections/utils/pipe-transforms/country-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/custom-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/division-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/index.ts +15 -15
- package/src/_collections/utils/pipe-transforms/list-pipe.util.ts +10 -14
- package/src/_collections/utils/pipe-transforms/multi-pipe-pipe.util.ts +160 -160
- package/src/_collections/utils/pipe-transforms/obj-key-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/range-pipe.util.ts +94 -94
- package/src/_collections/utils/pipe-transforms/region-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/replace-pipe.util.ts +11 -11
- package/src/_collections/utils/pipe-transforms/slider-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/smart-replace-pipe.util.ts +71 -71
- package/src/_collections/utils/regex/index.ts +4 -4
- package/src/_collections/utils/regex/password-regex.util.ts +52 -52
- package/src/_collections/utils/regex/regex.util.ts +6 -6
- package/src/_collections/utils/regex/username-regex.util.ts +33 -33
- package/src/_collections/utils/regions.util.ts +100 -97
- package/src/_collections/utils/round-list.util.ts +44 -44
- package/src/_collections/utils/shared.static-service.ts +177 -177
- package/src/_collections/utils/time.util.spec.ts +50 -50
- package/src/_collections/utils/time.util.ts +219 -219
- package/src/_collections/utils/type-cloning-facility.util.ts +121 -121
- package/src/_collections/utils/utilities.util.ts +130 -130
- package/src/_enums/basic-property-type.enum.ts +9 -9
- package/src/_enums/data-model-type.enum.ts +13 -13
- package/src/_enums/day-of-week.enum.ts +28 -28
- package/src/_enums/error-level.enum.ts +17 -17
- package/src/_enums/index.ts +16 -16
- package/src/_enums/location/index.ts +3 -3
- package/src/_enums/location/region.enum.ts +9 -9
- package/src/_enums/location/sub-region.enum.ts +26 -26
- package/src/_enums/location/subdivision-region-type.enum.ts +44 -44
- package/src/_enums/log-style.enum.ts +30 -30
- package/src/_enums/month.enum.ts +16 -16
- package/src/_enums/pipe.enum.ts +45 -45
- package/src/_enums/range-pipe-setting.enum.ts +11 -11
- package/src/_enums/time/day-of-week.enum.ts +28 -28
- package/src/_enums/time/index.ts +3 -3
- package/src/_enums/time/month.enum.ts +16 -16
- package/src/_enums/time/relative-date.enum.ts +13 -13
- package/src/_models/control-models/daily-usage-data.control-model.ts +21 -21
- package/src/_models/control-models/data-model-params.control-model.ts +39 -39
- package/src/_models/control-models/data-property-params.control-model.ts +106 -106
- package/src/_models/control-models/error.control-model.spec.ts +753 -716
- package/src/_models/control-models/error.control-model.ts +722 -722
- package/src/_models/control-models/index.ts +10 -10
- package/src/_models/control-models/poll.control-model.ts +113 -113
- package/src/_models/control-models/range-value.control-model.ts +142 -142
- package/src/_models/control-models/usage-action.control-model.ts +15 -15
- package/src/_models/control-models/usage-data.control-model.ts +20 -20
- package/src/_models/data-models/custom-data.data-model.ts +28 -28
- package/src/_models/data-models/index.ts +5 -5
- package/src/_models/data-models/metadata.data-model.ts +83 -83
- package/src/_models/data-models/usage-session.data-model.ts +53 -53
- package/src/_models/index.ts +12 -12
- package/src/_models/interfaces/error-defaults.interface.ts +11 -11
- package/src/_models/interfaces/index.ts +11 -8
- package/src/_models/interfaces/location/country-division.interface.ts +7 -7
- package/src/_models/interfaces/location/country-iso.interface.ts +21 -21
- package/src/_models/interfaces/location/country-phone-code.interface.ts +7 -7
- package/src/_models/interfaces/location/division-collection.interface.ts +10 -10
- package/src/_models/interfaces/location/division-region-data.interface.ts +8 -8
- package/src/_models/interfaces/location/geo-ip-location.interface.ts +26 -26
- package/src/_models/interfaces/location/index.ts +10 -10
- package/src/_models/interfaces/location/location-coordinates.interface.ts +5 -5
- package/src/_models/interfaces/multi-pipe-settings.type.ts +7 -7
- package/src/_models/interfaces/paged.interface.ts +11 -11
- package/src/_models/interfaces/pipe-transforms.interface.ts +29 -29
- package/src/_models/interfaces/random-weight.interface.ts +7 -7
- package/src/_models/interfaces/route-settings.interface.ts +11 -11
- package/src/_modules/collections.index.ts +2 -2
- package/src/_modules/constants.index.ts +2 -2
- package/src/_modules/custom-data-module.index.ts +6 -6
- package/src/_modules/data-modules.index.ts +9 -9
- package/src/_modules/enums.index.ts +2 -2
- package/src/_modules/error-module.index.ts +8 -8
- package/src/_modules/location.index.ts +15 -15
- package/src/_modules/models.index.ts +2 -2
- package/src/_modules/shared-service.index.ts +9 -9
- package/src/_modules/test-module.index.ts +5 -5
- package/src/_modules/usage-module.index.ts +10 -10
- package/tsconfig.json +29 -29
- package/tslint.json +153 -153
- package/build/_enums/region.enum.d.ts +0 -8
- package/build/_enums/region.enum.d.ts.map +0 -1
- package/build/_enums/region.enum.js +0 -12
- package/build/_enums/region.enum.js.map +0 -1
- package/build/_enums/relative-date.enum.d.ts +0 -9
- package/build/_enums/relative-date.enum.d.ts.map +0 -1
- package/build/_enums/relative-date.enum.js +0 -13
- package/build/_enums/relative-date.enum.js.map +0 -1
- package/build/_enums/sub-region.enum.d.ts +0 -20
- package/build/_enums/sub-region.enum.d.ts.map +0 -1
- package/build/_enums/sub-region.enum.js +0 -24
- package/build/_enums/sub-region.enum.js.map +0 -1
- package/build/_enums/subdivision-region-type.enum.d.ts +0 -41
- package/build/_enums/subdivision-region-type.enum.d.ts.map +0 -1
- package/build/_enums/subdivision-region-type.enum.js +0 -46
- package/build/_enums/subdivision-region-type.enum.js.map +0 -1
- package/src/_enums/region.enum.ts +0 -9
- package/src/_enums/relative-date.enum.ts +0 -13
- package/src/_enums/sub-region.enum.ts +0 -26
- package/src/_enums/subdivision-region-type.enum.ts +0 -44
|
@@ -1,716 +1,753 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { DynamoFM_error_defaults } from '../../_collections/constants/error-defaults.const';
|
|
4
|
-
import { DynamoFM_Log } from '../../_collections/utils/log.util';
|
|
5
|
-
import { DynamoFM_Error } from './error.control-model';
|
|
6
|
-
|
|
7
|
-
describe('DynamoFM_Error;', (): void => {
|
|
8
|
-
let error_base: Error;
|
|
9
|
-
let error_0: DynamoFM_Error;
|
|
10
|
-
let error_stack_1: DynamoFM_Error;
|
|
11
|
-
let error_stack_withoutSubErrors_1: DynamoFM_Error;
|
|
12
|
-
let error_stack_2: DynamoFM_Error;
|
|
13
|
-
let error_stack_withoutSubErrors_2: DynamoFM_Error;
|
|
14
|
-
let error_selfDefined: DynamoFM_Error;
|
|
15
|
-
|
|
16
|
-
const message_base: string = '-TEST ERROR: something failed!-';
|
|
17
|
-
const message_1: string = 'TEST ERROR MSG (1)';
|
|
18
|
-
const message_2: string = 'TEST ERROR MSG (2)';
|
|
19
|
-
const message_selfDefined: string =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const log: boolean =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
DynamoFM_Log.testLog('error_stack_2:\n', error_stack_2);
|
|
107
|
-
DynamoFM_Log.testLog('error_stack_2.
|
|
108
|
-
DynamoFM_Log.testLog('
|
|
109
|
-
DynamoFM_Log.testLog('
|
|
110
|
-
DynamoFM_Log.testLog('error_selfDefined:\n', error_selfDefined);
|
|
111
|
-
DynamoFM_Log.testLog(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
it('on
|
|
213
|
-
expect(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
});
|
|
716
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import { DynamoFM_error_defaults } from '../../_collections/constants/error-defaults.const';
|
|
4
|
+
import { DynamoFM_Log } from '../../_collections/utils/log.util';
|
|
5
|
+
import { DynamoFM_Error } from './error.control-model';
|
|
6
|
+
|
|
7
|
+
describe('DynamoFM_Error;', (): void => {
|
|
8
|
+
let error_base: Error;
|
|
9
|
+
let error_0: DynamoFM_Error;
|
|
10
|
+
let error_stack_1: DynamoFM_Error;
|
|
11
|
+
let error_stack_withoutSubErrors_1: DynamoFM_Error;
|
|
12
|
+
let error_stack_2: DynamoFM_Error;
|
|
13
|
+
let error_stack_withoutSubErrors_2: DynamoFM_Error;
|
|
14
|
+
let error_selfDefined: DynamoFM_Error;
|
|
15
|
+
|
|
16
|
+
const message_base: string = '-TEST ERROR: something failed!-';
|
|
17
|
+
const message_1: string = 'TEST ERROR MSG (1)';
|
|
18
|
+
const message_2: string = 'TEST ERROR MSG (2)';
|
|
19
|
+
const message_selfDefined: string = 'error.control-model.spec.js:82:29';
|
|
20
|
+
|
|
21
|
+
const errorCode_0: string = 'ASD-ASD-001';
|
|
22
|
+
const errorCode_1: string = 'ASD-ASD-002';
|
|
23
|
+
const errorCode_2: string = 'ASD-ASD-003';
|
|
24
|
+
|
|
25
|
+
const userMessage_0: string = 'DynamoFM_Error TEST was TEST! (0)';
|
|
26
|
+
const userMessage_2: string = 'DynamoFM_Error TEST was TEST! (2)';
|
|
27
|
+
|
|
28
|
+
const userMessageResult_0: string = userMessage_0 + `\nErrorCode: ${errorCode_0}`;
|
|
29
|
+
const userMessageResult_2: string = userMessage_2 + `\nErrorCode: ${errorCode_2}`;
|
|
30
|
+
|
|
31
|
+
const issuer: string = 'DynamoFM_Error TEST User';
|
|
32
|
+
const issuerSystem: string = 'DynamoFM_FSM TEST';
|
|
33
|
+
const issuerService_0: string = 'Service-0';
|
|
34
|
+
const issuerService_1: string = 'Service-1';
|
|
35
|
+
|
|
36
|
+
const additionalContent_1 = {
|
|
37
|
+
test: 'test',
|
|
38
|
+
test2: 'test2',
|
|
39
|
+
};
|
|
40
|
+
const additionalContent_2 = {
|
|
41
|
+
test2: 'testZ',
|
|
42
|
+
test3: 'test3',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const log: boolean = false;
|
|
46
|
+
/* const log: boolean = true; */
|
|
47
|
+
|
|
48
|
+
beforeEach(async (): Promise<void> => {
|
|
49
|
+
error_base = new Error(message_base);
|
|
50
|
+
|
|
51
|
+
error_0 = new DynamoFM_Error({
|
|
52
|
+
userMessage: userMessage_0,
|
|
53
|
+
addECToUserMsg: true,
|
|
54
|
+
errorCode: errorCode_0,
|
|
55
|
+
issuerSystem: issuerSystem,
|
|
56
|
+
issuer: issuer,
|
|
57
|
+
issuerService: issuerService_0,
|
|
58
|
+
error: error_base,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
error_stack_1 = new DynamoFM_Error({
|
|
62
|
+
message: message_1,
|
|
63
|
+
errorCode: errorCode_1,
|
|
64
|
+
issuerService: issuerService_1,
|
|
65
|
+
handled: true,
|
|
66
|
+
additionalContent: additionalContent_1,
|
|
67
|
+
error: error_0,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
error_stack_withoutSubErrors_1 = {
|
|
71
|
+
...error_stack_1,
|
|
72
|
+
} as DynamoFM_Error;
|
|
73
|
+
error_stack_withoutSubErrors_1.errors.forEach((error: DynamoFM_Error): any => {
|
|
74
|
+
const subError = { ...error };
|
|
75
|
+
|
|
76
|
+
delete (subError as DynamoFM_Error).errors;
|
|
77
|
+
|
|
78
|
+
return subError;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
error_stack_2 = new DynamoFM_Error({
|
|
82
|
+
message: message_2,
|
|
83
|
+
userMessage: userMessage_2,
|
|
84
|
+
addECToUserMsg: true,
|
|
85
|
+
errorCode: errorCode_2,
|
|
86
|
+
additionalContent: additionalContent_2,
|
|
87
|
+
error: error_stack_1,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
error_stack_withoutSubErrors_2 = {
|
|
91
|
+
...error_stack_2,
|
|
92
|
+
} as DynamoFM_Error;
|
|
93
|
+
error_stack_withoutSubErrors_2.errors.map((error: DynamoFM_Error): any => {
|
|
94
|
+
const subError = { ...error };
|
|
95
|
+
|
|
96
|
+
delete (subError as DynamoFM_Error).errors;
|
|
97
|
+
|
|
98
|
+
return subError;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
error_selfDefined = new DynamoFM_Error();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
if (log) afterAll(async (): Promise<void> => {
|
|
105
|
+
DynamoFM_Log.testLog('error_stack_2:\n', error_stack_2);
|
|
106
|
+
DynamoFM_Log.testLog('error_stack_2.getFlat:\n', error_stack_2.getErrorsFlat());
|
|
107
|
+
DynamoFM_Log.testLog('error_stack_2.getSimplified:\n', error_stack_2.getErrorSimplified());
|
|
108
|
+
DynamoFM_Log.testLog('error_stack_withoutSubErrors_2:\n', error_stack_withoutSubErrors_2);
|
|
109
|
+
DynamoFM_Log.testLog('error_selfDefined:\n', error_selfDefined);
|
|
110
|
+
DynamoFM_Log.testLog('error_selfDefined.getFlat:\n', error_selfDefined.getErrorsFlat());
|
|
111
|
+
DynamoFM_Log.testLog(
|
|
112
|
+
'error_selfDefined.getSimplified:\n', error_selfDefined.getErrorSimplified()
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
describe('should be defined;', (): void => {
|
|
117
|
+
it('error object', (): void => {
|
|
118
|
+
expect(error_0).toBeDefined();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('error stack object', (): void => {
|
|
122
|
+
expect(error_stack_1).toBeDefined();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('greater error stack object', (): void => {
|
|
126
|
+
expect(error_stack_2).toBeDefined();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it('self defined error object', (): void => {
|
|
130
|
+
expect(error_selfDefined).toBeDefined();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
describe('should be instance of DynamoFM_Error;', (): void => {
|
|
135
|
+
it('error as DynamoFM_Error object', (): void => {
|
|
136
|
+
expect(error_0).toBeInstanceOf(DynamoFM_Error);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('error stack as DynamoFM_Error object', (): void => {
|
|
140
|
+
expect(error_stack_1).toBeInstanceOf(DynamoFM_Error);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it('greater error stack as DynamoFM_Error object', (): void => {
|
|
144
|
+
expect(error_stack_2).toBeInstanceOf(DynamoFM_Error);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('self defined error as DynamoFM_Error object', (): void => {
|
|
148
|
+
expect(error_selfDefined).toBeInstanceOf(DynamoFM_Error);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
describe('should have the proper _errorCode;', (): void => {
|
|
153
|
+
it('on error_0', (): void => {
|
|
154
|
+
expect(error_0._errorCode).toBe(errorCode_0);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('on error_stack_1', (): void => {
|
|
158
|
+
expect(error_stack_1._errorCode).toBe(errorCode_0);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('on error_stack_2', (): void => {
|
|
162
|
+
expect(error_stack_2._errorCode).toBe(errorCode_0);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('on self defined error', (): void => {
|
|
166
|
+
expect(error_selfDefined._errorCode).toBe(DynamoFM_error_defaults.errorCode);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
describe('should have the proper _errorCodes;', (): void => {
|
|
171
|
+
it('on error_0', (): void => {
|
|
172
|
+
expect(error_0._errorCodes).toEqual([ errorCode_0 ]);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it('on error_stack_1', (): void => {
|
|
176
|
+
expect(error_stack_1._errorCodes).toEqual([ errorCode_0, errorCode_1 ]);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('on error_stack_2', (): void => {
|
|
180
|
+
expect(error_stack_2._errorCodes).toEqual([ errorCode_0, errorCode_1, errorCode_2 ]);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('on self defined error', (): void => {
|
|
184
|
+
expect(error_selfDefined._errorCodes).toEqual([ DynamoFM_error_defaults.errorCode ]);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
describe('should have the proper _message;', (): void => {
|
|
189
|
+
it('on error_0', (): void => {
|
|
190
|
+
expect(error_0._message).toBe(message_base);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it('on error_stack_1', (): void => {
|
|
194
|
+
expect(error_stack_1._message).toBe(message_base);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('on error_stack_2', (): void => {
|
|
198
|
+
expect(error_stack_2._message).toBe(message_base);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it('on self defined error (stack)', (): void => {
|
|
202
|
+
expect(
|
|
203
|
+
error_selfDefined._message.includes(message_selfDefined)
|
|
204
|
+
).withContext(
|
|
205
|
+
`"${error_selfDefined._message}"` +
|
|
206
|
+
'\n not contains' +
|
|
207
|
+
`\n"${message_selfDefined}"` +
|
|
208
|
+
'"\n '
|
|
209
|
+
).toBe(true);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('on self defined error (flag)', (): void => {
|
|
213
|
+
expect(
|
|
214
|
+
error_selfDefined._message.includes(DynamoFM_error_defaults.message)
|
|
215
|
+
).withContext(
|
|
216
|
+
`"${error_selfDefined._message}"` +
|
|
217
|
+
'\n not contains' +
|
|
218
|
+
`\n"${DynamoFM_error_defaults.message}"` +
|
|
219
|
+
'"\n '
|
|
220
|
+
).toBe(true);
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
describe('should have the proper _messages;', (): void => {
|
|
225
|
+
it('on error_0', (): void => {
|
|
226
|
+
expect(error_0._messages).toEqual([ message_base ]);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it('on error_stack_1', (): void => {
|
|
230
|
+
expect(error_stack_1._messages).toEqual([ message_base, message_1 ]);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it('on error_stack_2', (): void => {
|
|
234
|
+
expect(error_stack_2._messages).toEqual([ message_base, message_1, message_2 ]);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('on self defined error (stack)', (): void => {
|
|
238
|
+
expect(
|
|
239
|
+
error_selfDefined._messages.length === 1 &&
|
|
240
|
+
error_selfDefined._messages?.[0]?.includes(message_selfDefined)
|
|
241
|
+
).withContext(
|
|
242
|
+
`"${error_selfDefined._messages?.[0]}"` +
|
|
243
|
+
'\n not contains' +
|
|
244
|
+
`\n"${message_selfDefined}"` +
|
|
245
|
+
'"\n '
|
|
246
|
+
).toBe(true);
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it('on self defined error (flag)', (): void => {
|
|
250
|
+
expect(
|
|
251
|
+
error_selfDefined._messages.length === 1 &&
|
|
252
|
+
error_selfDefined._messages?.[0]?.includes(DynamoFM_error_defaults.message)
|
|
253
|
+
).withContext(
|
|
254
|
+
`"${error_selfDefined._messages?.[0]}"` +
|
|
255
|
+
'\n not contains' +
|
|
256
|
+
`\n"${DynamoFM_error_defaults.message}"` +
|
|
257
|
+
'"\n '
|
|
258
|
+
).toBe(true);
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
describe('should have the proper __userMessage;', (): void => {
|
|
263
|
+
it('on error_0', (): void => {
|
|
264
|
+
expect(error_0.__userMessage).toBe(userMessageResult_0);
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
it('on error_stack_1', (): void => {
|
|
268
|
+
expect(error_stack_1.__userMessage).toBe(userMessageResult_0);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it('on error_stack_2', (): void => {
|
|
272
|
+
expect(error_stack_2.__userMessage).toBe(userMessageResult_0);
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('on self defined error', (): void => {
|
|
276
|
+
expect(error_selfDefined.__userMessage).toBeUndefined();
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
describe('should have the proper __userMessages;', (): void => {
|
|
281
|
+
it('on error_0', (): void => {
|
|
282
|
+
expect(error_0.__userMessages).toEqual([ userMessageResult_0 ]);
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
it('on error_stack_1', (): void => {
|
|
286
|
+
expect(error_stack_1.__userMessages).toEqual(
|
|
287
|
+
[ userMessageResult_0, DynamoFM_error_defaults.userMessage ]
|
|
288
|
+
);
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
it('on error_stack_2', (): void => {
|
|
292
|
+
expect(error_stack_2.__userMessages).toEqual(
|
|
293
|
+
[ userMessageResult_0, DynamoFM_error_defaults.userMessage, userMessageResult_2 ]
|
|
294
|
+
);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
it('on self defined error', (): void => {
|
|
298
|
+
expect(error_selfDefined.__userMessages).toEqual([ DynamoFM_error_defaults.userMessage ]);
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
describe('should have proper error;', (): void => {
|
|
303
|
+
it('on error_0', (): void => {
|
|
304
|
+
expect(error_0.error).toBe(error_base);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it('on error_stack_1', (): void => {
|
|
308
|
+
expect(error_stack_1.error).toBe(error_base);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
it('on error_stack_2', (): void => {
|
|
312
|
+
expect(error_stack_2.error).toBe(error_base);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
it('on self defined error', (): void => {
|
|
316
|
+
expect(error_selfDefined.error).toBeDefined();
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
describe('should have the proper errors;', (): void => {
|
|
321
|
+
it('on error_0', (): void => {
|
|
322
|
+
expect(error_0.errors).toEqual([ error_base ]);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
it('on error_stack_1', (): void => {
|
|
326
|
+
expect(error_stack_1.errors).toEqual([ error_base, error_0 ]);
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
it('on error_stack_2', (): void => {
|
|
330
|
+
expect(error_stack_2.errors).toEqual([ error_base, error_0, error_stack_1 ]);
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it('on self defined error', (): void => {
|
|
334
|
+
expect(error_selfDefined?.errors?.length).toBe(1);
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
describe('should have proper handled;', (): void => {
|
|
339
|
+
it('on error_0', (): void => {
|
|
340
|
+
expect(error_0.___handled).toBe(false);
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
it('on error_stack_1', (): void => {
|
|
344
|
+
expect(error_stack_1.___handled).toBe(true);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
it('on error_stack_2', (): void => {
|
|
348
|
+
expect(error_stack_2.___handled).toBe(true);
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
it('on self defined error', (): void => {
|
|
352
|
+
expect(error_selfDefined.___handled).toBe(false);
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
describe('should have status: undefined;', (): void => {
|
|
357
|
+
it('on error_0', (): void => {
|
|
358
|
+
expect(error_0.___status).toBe(undefined);
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
it('on error_stack_1', (): void => {
|
|
362
|
+
expect(error_stack_1.___status).toBe(undefined);
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
it('on error_stack_2', (): void => {
|
|
366
|
+
expect(error_stack_2.___status).toBe(undefined);
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
it('on self defined error', (): void => {
|
|
370
|
+
expect(error_selfDefined.___status).toBe(undefined);
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
describe('should have the proper issuer;', (): void => {
|
|
375
|
+
it('on error_0', (): void => {
|
|
376
|
+
expect(error_0.___issuer).toBe(issuer);
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
it('on error_stack_1', (): void => {
|
|
380
|
+
expect(error_stack_1.___issuer).toBe(issuer);
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
it('on error_stack_2', (): void => {
|
|
384
|
+
expect(error_stack_2.___issuer).toBe(issuer);
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
it('on self defined error', (): void => {
|
|
388
|
+
expect(error_selfDefined.___issuer).toBe(DynamoFM_error_defaults.issuer);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
describe('should have get proper additionalContent;', (): void => {
|
|
393
|
+
it('on error_0', (): void => {
|
|
394
|
+
expect(error_0.additionalContent).toEqual({});
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
it('on error_stack_1', (): void => {
|
|
398
|
+
expect(error_stack_1.additionalContent).toEqual(additionalContent_1);
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
it('on error_stack_2', (): void => {
|
|
402
|
+
expect(error_stack_2.additionalContent).toEqual({
|
|
403
|
+
...additionalContent_1,
|
|
404
|
+
...additionalContent_2,
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it('on self defined error', (): void => {
|
|
409
|
+
expect(error_selfDefined.additionalContent).toEqual({});
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
describe('should have the proper issuerSystem;', (): void => {
|
|
414
|
+
it('on error_0', (): void => {
|
|
415
|
+
expect(error_0.___issuerSystem).toBe(issuerSystem);
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
it('on error_stack_1', (): void => {
|
|
419
|
+
expect(error_stack_1.___issuerSystem).toBe(issuerSystem);
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
it('on error_stack_2', (): void => {
|
|
423
|
+
expect(error_stack_2.___issuerSystem).toBe(issuerSystem);
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
it('on self defined error', (): void => {
|
|
427
|
+
expect(error_selfDefined.___issuerSystem).toBe(DynamoFM_error_defaults.issuerSystem);
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
describe('should have the proper issuerService;', (): void => {
|
|
432
|
+
it('on error_0', (): void => {
|
|
433
|
+
expect(error_0.___issuerService).toBe(issuerService_0);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
it('on error_stack_1', (): void => {
|
|
437
|
+
expect(error_stack_1.___issuerService).toBe(issuerService_1);
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
it('on error_stack_2', (): void => {
|
|
441
|
+
expect(error_stack_2.___issuerService).toBe(issuerService_1);
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
it('on self defined error', (): void => {
|
|
445
|
+
expect(error_selfDefined.___issuerService).toBe(DynamoFM_error_defaults.issuerService);
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
describe('should have get proper simplified;', (): void => {
|
|
450
|
+
let simplified;
|
|
451
|
+
|
|
452
|
+
describe('on error_0;', (): void => {
|
|
453
|
+
beforeEach((): void => {
|
|
454
|
+
simplified = error_0.getErrorSimplified();
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
it('should be defined', (): void => {
|
|
458
|
+
expect(simplified).toBeDefined();
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
it('should have error', (): void => {
|
|
462
|
+
expect(simplified.error).toBeDefined();
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
it('should not have errors', (): void => {
|
|
466
|
+
expect(simplified.errors).toBeUndefined();
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
it('should not have simplified.error.error', (): void => {
|
|
470
|
+
expect((simplified.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
it('should not have simplified.error.errors', (): void => {
|
|
474
|
+
expect((simplified.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
describe('on error_stack_1;', (): void => {
|
|
479
|
+
beforeEach((): void => {
|
|
480
|
+
simplified = error_stack_1.getErrorSimplified();
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
it('should be defined', (): void => {
|
|
484
|
+
expect(simplified).toBeDefined();
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
it('should have error', (): void => {
|
|
488
|
+
expect(simplified.error).toBeDefined();
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
it('should not have errors', (): void => {
|
|
492
|
+
expect(simplified.errors).toBeUndefined();
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
it('should not have simplified.error.error', (): void => {
|
|
496
|
+
expect((simplified.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
it('should not have simplified.error.errors', (): void => {
|
|
500
|
+
expect((simplified.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
describe('on error_stack_2;', (): void => {
|
|
505
|
+
beforeEach((): void => {
|
|
506
|
+
simplified = error_stack_2.getErrorSimplified();
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
it('should be defined', (): void => {
|
|
510
|
+
expect(simplified).toBeDefined();
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
it('should have error', (): void => {
|
|
514
|
+
expect(simplified.error).toBeDefined();
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
it('should not have errors', (): void => {
|
|
518
|
+
expect(simplified.errors).toBeUndefined();
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
it('should not have simplified.error.error', (): void => {
|
|
522
|
+
expect((simplified.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
it('should not have simplified.error.errors', (): void => {
|
|
526
|
+
expect((simplified.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
describe('on self defined error;', (): void => {
|
|
531
|
+
beforeEach((): void => {
|
|
532
|
+
simplified = error_selfDefined.getErrorSimplified();
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
it('should be defined', (): void => {
|
|
536
|
+
expect(simplified).toBeDefined();
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
it('should have error', (): void => {
|
|
540
|
+
expect(simplified.error).toBeDefined();
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
it('should not have errors', (): void => {
|
|
544
|
+
expect(simplified.errors).toBeUndefined();
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
it('should not have simplified.error.error', (): void => {
|
|
548
|
+
expect((simplified.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
it('should not have simplified.error.errors', (): void => {
|
|
552
|
+
expect((simplified.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
553
|
+
});
|
|
554
|
+
});
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
describe('should have get proper flat;', (): void => {
|
|
558
|
+
let flat;
|
|
559
|
+
|
|
560
|
+
describe('on error_0;', (): void => {
|
|
561
|
+
beforeEach((): void => {
|
|
562
|
+
flat = error_0.getErrorsFlat();
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
it('should be defined', (): void => {
|
|
566
|
+
expect(flat).toBeDefined();
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
it('should have error', (): void => {
|
|
570
|
+
expect(flat.error).toBeDefined();
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
describe('errors...;', (): void => {
|
|
574
|
+
it('should have errors', (): void => {
|
|
575
|
+
expect(flat?.errors).toBeDefined();
|
|
576
|
+
});
|
|
577
|
+
|
|
578
|
+
it('should have 1 errors', (): void => {
|
|
579
|
+
expect(flat?.errors?.length).toBe(1);
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
flat?.errors?.forEach((error: DynamoFM_Error, index: number): void => {
|
|
583
|
+
describe(`on error[${index}];`, (): void => {
|
|
584
|
+
it('should be', (): void => {
|
|
585
|
+
expect(error).toBeDefined();
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
it(`should have error[${index}].error`, (): void => {
|
|
589
|
+
expect(error.error).toBeDefined();
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
it(`should not have error[${index}].errors`, (): void => {
|
|
593
|
+
expect(error.errors).toBeUndefined();
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
it(`should not have error[${index}].error.error`, (): void => {
|
|
597
|
+
expect((error.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
it(`should not have error[${index}].error.errors`, (): void => {
|
|
601
|
+
expect((error.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
describe('on error_stack_1;', (): void => {
|
|
609
|
+
beforeEach((): void => {
|
|
610
|
+
flat = error_stack_1.getErrorsFlat();
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
it('should be defined', (): void => {
|
|
614
|
+
expect(flat).toBeDefined();
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
it('should have error', (): void => {
|
|
618
|
+
expect(flat.error).toBeDefined();
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
describe('errors...;', (): void => {
|
|
622
|
+
it('should have errors', (): void => {
|
|
623
|
+
expect(flat?.errors).toBeDefined();
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
it('should have 2 errors', (): void => {
|
|
627
|
+
expect(flat?.errors?.length).toBe(2);
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
flat?.errors?.forEach((error: DynamoFM_Error, index: number): void => {
|
|
631
|
+
describe(`on error[${index}];`, (): void => {
|
|
632
|
+
it('should be', (): void => {
|
|
633
|
+
expect(error).toBeDefined();
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
it(`should have error[${index}].error`, (): void => {
|
|
637
|
+
expect(error.error).toBeDefined();
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
it(`should not have error[${index}].errors`, (): void => {
|
|
641
|
+
expect(error.errors).toBeUndefined();
|
|
642
|
+
});
|
|
643
|
+
|
|
644
|
+
it('should not have error[${index}].error.error', (): void => {
|
|
645
|
+
expect((error.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
it('should not have error[${index}].error.errors', (): void => {
|
|
649
|
+
expect((error.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
describe('on error_stack_2;', (): void => {
|
|
657
|
+
beforeEach((): void => {
|
|
658
|
+
flat = error_stack_2.getErrorsFlat();
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
it('should be defined', (): void => {
|
|
662
|
+
expect(flat).toBeDefined();
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
it('should have error', (): void => {
|
|
666
|
+
expect(flat.error).toBeDefined();
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
describe('errors...;', (): void => {
|
|
670
|
+
it('should have errors', (): void => {
|
|
671
|
+
expect(flat?.errors).toBeDefined();
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
it('should have 3 errors', (): void => {
|
|
675
|
+
expect(flat?.errors?.length).toBe(3);
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
flat?.errors?.forEach((error: DynamoFM_Error, index: number): void => {
|
|
679
|
+
describe(`on error[${index}];`, (): void => {
|
|
680
|
+
it('should be', (): void => {
|
|
681
|
+
expect(error).toBeDefined();
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
it(`should have error[${index}].error`, (): void => {
|
|
685
|
+
expect(error.error).toBeDefined();
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
it(`should not have error[${index}].errors`, (): void => {
|
|
689
|
+
expect(error.errors).toBeUndefined();
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
it(`should not have error[${index}].error.error`, (): void => {
|
|
693
|
+
expect((error.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
it(`should not have error[${index}].error.errors`, (): void => {
|
|
697
|
+
expect((error.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
describe('on self defined error;', (): void => {
|
|
705
|
+
beforeEach((): void => {
|
|
706
|
+
flat = error_selfDefined.getErrorsFlat();
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
it('should be defined', (): void => {
|
|
710
|
+
expect(flat).toBeDefined();
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
it('should have error', (): void => {
|
|
714
|
+
expect(flat.error).toBeDefined();
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
describe('errors...;', (): void => {
|
|
718
|
+
it('should have errors', (): void => {
|
|
719
|
+
expect(flat?.errors).toBeDefined();
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
it('should have 1 errors', (): void => {
|
|
723
|
+
expect(flat?.errors?.length).toBe(1);
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
flat?.errors?.forEach((error: DynamoFM_Error, index: number): void => {
|
|
727
|
+
describe(`on error[${index}];`, (): void => {
|
|
728
|
+
it('should be', (): void => {
|
|
729
|
+
expect(error).toBeDefined();
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
it(`should have error[${index}].error`, (): void => {
|
|
733
|
+
expect(error.error).toBeDefined();
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
it(`should not have error[${index}].errors`, (): void => {
|
|
737
|
+
expect(error.errors).toBeUndefined();
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
it(`should not have error[${index}].error.error`, (): void => {
|
|
741
|
+
expect((error.error as DynamoFM_Error)?.error).toBeUndefined();
|
|
742
|
+
});
|
|
743
|
+
|
|
744
|
+
it(`should not have error[${index}].error.errors`, (): void => {
|
|
745
|
+
expect((error.error as DynamoFM_Error)?.errors).toBeUndefined();
|
|
746
|
+
});
|
|
747
|
+
});
|
|
748
|
+
});
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
|