@futdevpro/fsm-dynamo 1.5.60 → 1.5.63

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.
@@ -1 +1 @@
1
- {"version":3,"file":"log.util.js","sourceRoot":"","sources":["../../src/_utils/log.util.ts"],"names":[],"mappings":";;;AACA,6DAA2D;AAO3D,MAAa,UAAU;IACrB,MAAM,CAAC,cAAc,CAAC,OAAe,EAAE,GAAG,cAAqB;QAC7D,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;QAC5F,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;IAC9F,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAe,EAAE,GAAG,cAAqB;QACtD,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;QAC5F,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;IAC9F,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,MAAyB;QACvC,IAAI,SAAS,GAAG,EAAE,CAAC;QACnB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAsB,EAAE,EAAE;YACxC,SAAS,IAAI,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,CAAC,UAAU;QACf,OAAO,CAAC,GAAG,CAAC,gCAAe,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,MAAyB,EAAE,SAAmB;QAC3E,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,OAAO,CAAC,CAA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,CAAC,CAAC;QACxB,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QACvB,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QACxB,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QACxB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAC3B,CAAC;CACF;AAnHD,gCAmHC"}
@@ -197,7 +197,7 @@
197
197
  "affectsGlobalScope": false
198
198
  },
199
199
  "../src/_models/data-models/metadata.data-model.ts": {
200
- "version": "9a8481c783842bfac236bf574f8be8903d41de6c26505e4ef2137a784d6cb0e9",
200
+ "version": "d15eb2977cfb23e7e09e32f07d6b914f8b22b3d6555e8a02af43ce18845cf36f",
201
201
  "signature": "82446094916089b85a998f4d70e2fa159b0709e9c9d607c82f19dc51c1845d14",
202
202
  "affectsGlobalScope": false
203
203
  },
@@ -362,12 +362,12 @@
362
362
  "affectsGlobalScope": false
363
363
  },
364
364
  "../src/_utils/log.util.ts": {
365
- "version": "42196d87f9324b00c925bf0e5a68fe3ae8b3dee87764068ad99bda4ea0082620",
365
+ "version": "d100fcf449a356d84e2c86562a66c0b235ab6b1db40d3228a7478dd13dbae4af",
366
366
  "signature": "0a06f8014f76347df17502c49ac5a8ee0074a8282e07bd38911f89513146ed48",
367
367
  "affectsGlobalScope": false
368
368
  },
369
369
  "../src/_models/control-models/error.control-model.ts": {
370
- "version": "b8ef7f977ab247879d0e3ce4013094cb88e968446c0609673d18277b853c1b1e",
370
+ "version": "bb148b1db911a5de56b5e4cd85ace71c6b31c99f94accbda1da6b7df030546cd",
371
371
  "signature": "f793e34d7b18443997cc64e3b850c1ea2b9813a60f14dc770d4a4eaabc8d2f1c",
372
372
  "affectsGlobalScope": false
373
373
  },
@@ -469,7 +469,7 @@
469
469
  "affectsGlobalScope": false
470
470
  },
471
471
  "../src/_models/control-models/error.control-model.spec.ts": {
472
- "version": "cdd726e5a1fb451b7ca9c3a86ef020225f24589446766196570fd520c1785851",
472
+ "version": "ac7736cd9d2659e4f4b372da1335ec14eea34242ae22356883058d8db07b6025",
473
473
  "signature": "9993da6c9588ba777b12d613520afad482510e64ade007457d175e9e53a8d003",
474
474
  "affectsGlobalScope": false
475
475
  },
@@ -1920,8 +1920,7 @@
1920
1920
  "../node_modules/@types/node/ts3.2/fs.d.ts",
1921
1921
  "../node_modules/@types/node/ts3.2/process.d.ts",
1922
1922
  "../node_modules/@types/node/ts3.2/util.d.ts",
1923
- "../node_modules/@types/node/util.d.ts",
1924
- "../src/_models/control-models/index.ts"
1923
+ "../node_modules/@types/node/util.d.ts"
1925
1924
  ],
1926
1925
  "../src/_models/data-models/usage-session.data-model.ts": [
1927
1926
  "../node_modules/@types/node/fs.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.05.60",
3
+ "version": "01.05.63",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Ltd.",
5
5
  "scripts": {
6
6
  "start": "npm run test-live",
@@ -8,13 +8,15 @@ describe('Dynamo_Error;', () => {
8
8
  let error_base: Error;
9
9
  let error_0: Dynamo_Error;
10
10
  let error_stack_1: Dynamo_Error;
11
+ let error_stack_withoutSubErrors_1: Dynamo_Error;
11
12
  let error_stack_2: Dynamo_Error;
13
+ let error_stack_withoutSubErrors_2: Dynamo_Error;
12
14
  let error_selfDefined: Dynamo_Error;
13
15
 
14
16
  const message_base: string = '-TEST ERROR: something failed!-';
15
17
  const message_1: string = 'TEST ERROR MSG (1)';
16
18
  const message_2: string = 'TEST ERROR MSG (2)';
17
- const message_selfDefined: string = dynamo_error_default.message + '; error.control-model.spec.js:55:29';
19
+ const message_selfDefined: string = dynamo_error_default.message + '; error.control-model.spec.js:69:29';
18
20
 
19
21
  const errorCode_0: string = 'ASD-ASD-001';
20
22
  const errorCode_1: string = 'ASD-ASD-002';
@@ -55,6 +57,15 @@ describe('Dynamo_Error;', () => {
55
57
  error: error_0,
56
58
  });
57
59
 
60
+ error_stack_withoutSubErrors_1 = {
61
+ ...error_stack_1,
62
+ } as Dynamo_Error;
63
+ error_stack_withoutSubErrors_1.errors.forEach((error: Dynamo_Error) => {
64
+ const subError = { ...error };
65
+ delete (subError as Dynamo_Error).errors;
66
+ return subError;
67
+ });
68
+
58
69
  error_stack_2 = new Dynamo_Error({
59
70
  message: message_2,
60
71
  userMessage: userMessage_2,
@@ -63,13 +74,26 @@ describe('Dynamo_Error;', () => {
63
74
  error: error_stack_1,
64
75
  });
65
76
 
77
+ error_stack_withoutSubErrors_2 = {
78
+ ...error_stack_2,
79
+ } as Dynamo_Error;
80
+ error_stack_withoutSubErrors_2.errors.map((error: Dynamo_Error) => {
81
+ const subError = { ...error };
82
+ delete (subError as Dynamo_Error).errors;
83
+ return subError;
84
+ });
85
+
66
86
  error_selfDefined = new Dynamo_Error();
67
87
  });
68
88
 
69
89
  if (log) afterAll(async () => {
70
- Dynamo_Log.testLog(
71
- 'afterAll, error_stack_2:', error_stack_2, '\n\nselfDefined:', error_selfDefined
72
- );
90
+ Dynamo_Log.testLog('error_stack_2:\n', error_stack_2);
91
+ Dynamo_Log.testLog('error_stack_2.getFlat:\n', error_stack_2.getErrorsFlat());
92
+ Dynamo_Log.testLog('error_stack_2.getSimplified:\n', error_stack_2.getErrorSimplified());
93
+ Dynamo_Log.testLog('error_stack_withoutSubErrors_2:\n', error_stack_withoutSubErrors_2);
94
+ Dynamo_Log.testLog('error_selfDefined:\n', error_selfDefined);
95
+ Dynamo_Log.testLog('error_selfDefined.getFlat:\n', error_selfDefined.getErrorsFlat());
96
+ Dynamo_Log.testLog('error_selfDefined.getSimplified:\n', error_selfDefined.getErrorSimplified());
73
97
  });
74
98
 
75
99
  describe('should be defined;', () => {
@@ -126,165 +150,165 @@ describe('Dynamo_Error;', () => {
126
150
  });
127
151
  });
128
152
 
129
- describe('should have the proper _message;', () => {
153
+ describe('should have the proper _errorCodes;', () => {
130
154
  it('on error_0', () => {
131
- expect(error_0._message).toBe(message_base);
155
+ expect(error_0._errorCodes).toEqual([ errorCode_0 ]);
132
156
  });
133
-
157
+
134
158
  it('on error_stack_1', () => {
135
- expect(error_stack_1._message).toBe(message_base);
159
+ expect(error_stack_1._errorCodes).toEqual([ errorCode_0, errorCode_1 ]);
136
160
  });
137
161
 
138
162
  it('on error_stack_2', () => {
139
- expect(error_stack_2._message).toBe(message_base);
163
+ expect(error_stack_2._errorCodes).toEqual([ errorCode_0, errorCode_1, errorCode_2 ]);
140
164
  });
141
165
 
142
166
  it('on self defined error', () => {
143
- expect(error_selfDefined._message).toBe(message_selfDefined);
167
+ expect(error_selfDefined._errorCodes).toEqual([ dynamo_error_default.errorCode ]);
144
168
  });
145
169
  });
146
170
 
147
- describe('should have the proper __userMessage;', () => {
171
+ describe('should have the proper _message;', () => {
148
172
  it('on error_0', () => {
149
- expect(error_0.__userMessage).toBe(userMessageResult_0);
173
+ expect(error_0._message).toBe(message_base);
150
174
  });
151
175
 
152
176
  it('on error_stack_1', () => {
153
- expect(error_stack_1.__userMessage).toBe(userMessageResult_0);
177
+ expect(error_stack_1._message).toBe(message_base);
154
178
  });
155
179
 
156
180
  it('on error_stack_2', () => {
157
- expect(error_stack_2.__userMessage).toBe(userMessageResult_0);
181
+ expect(error_stack_2._message).toBe(message_base);
158
182
  });
159
183
 
160
184
  it('on self defined error', () => {
161
- expect(error_selfDefined.__userMessage).toBeUndefined();
185
+ expect(error_selfDefined._message).toBe(message_selfDefined);
162
186
  });
163
187
  });
164
188
 
165
- describe('should have proper error;', () => {
189
+ describe('should have the proper _messages;', () => {
166
190
  it('on error_0', () => {
167
- expect(error_0.error).toBe(error_base);
191
+ expect(error_0._messages).toEqual([ message_base ]);
168
192
  });
169
193
 
170
194
  it('on error_stack_1', () => {
171
- expect(error_stack_1.error).toBe(error_base);
195
+ expect(error_stack_1._messages).toEqual([ message_base, message_1 ]);
172
196
  });
173
197
 
174
198
  it('on error_stack_2', () => {
175
- expect(error_stack_2.error).toBe(error_base);
199
+ expect(error_stack_2._messages).toEqual([ message_base, message_1, message_2 ]);
176
200
  });
177
201
 
178
202
  it('on self defined error', () => {
179
- expect(error_selfDefined.error).toBeUndefined();
203
+ expect(error_selfDefined._messages).toEqual([ message_selfDefined ]);
180
204
  });
181
205
  });
182
206
 
183
- describe('should have proper handled;', () => {
207
+ describe('should have the proper __userMessage;', () => {
184
208
  it('on error_0', () => {
185
- expect(error_0.___handled).toBe(false);
209
+ expect(error_0.__userMessage).toBe(userMessageResult_0);
186
210
  });
187
211
 
188
212
  it('on error_stack_1', () => {
189
- expect(error_stack_1.___handled).toBe(true);
213
+ expect(error_stack_1.__userMessage).toBe(userMessageResult_0);
190
214
  });
191
215
 
192
216
  it('on error_stack_2', () => {
193
- expect(error_stack_2.___handled).toBe(true);
217
+ expect(error_stack_2.__userMessage).toBe(userMessageResult_0);
194
218
  });
195
219
 
196
220
  it('on self defined error', () => {
197
- expect(error_selfDefined.___handled).toBe(false);
221
+ expect(error_selfDefined.__userMessage).toBeUndefined();
198
222
  });
199
223
  });
200
224
 
201
- describe('should have status: undefined;', () => {
225
+ describe('should have the proper __userMessages;', () => {
202
226
  it('on error_0', () => {
203
- expect(error_0.___status).toBe(undefined);
227
+ expect(error_0.__userMessages).toEqual([ userMessageResult_0 ]);
204
228
  });
205
229
 
206
230
  it('on error_stack_1', () => {
207
- expect(error_stack_1.___status).toBe(undefined);
231
+ expect(error_stack_1.__userMessages).toEqual([ userMessageResult_0, dynamo_error_default.userMessage ]);
208
232
  });
209
233
 
210
234
  it('on error_stack_2', () => {
211
- expect(error_stack_2.___status).toBe(undefined);
235
+ expect(error_stack_2.__userMessages).toEqual([ userMessageResult_0, dynamo_error_default.userMessage, userMessageResult_2 ]);
212
236
  });
213
237
 
214
238
  it('on self defined error', () => {
215
- expect(error_selfDefined.___status).toBe(undefined);
239
+ expect(error_selfDefined.__userMessages).toEqual([ dynamo_error_default.userMessage ]);
216
240
  });
217
241
  });
218
242
 
219
- describe('should have the proper _errorCodes;', () => {
243
+ describe('should have proper error;', () => {
220
244
  it('on error_0', () => {
221
- expect(error_0._errorCodes).toEqual([ errorCode_0 ]);
245
+ expect(error_0.error).toBe(error_base);
222
246
  });
223
-
247
+
224
248
  it('on error_stack_1', () => {
225
- expect(error_stack_1._errorCodes).toEqual([ errorCode_0, errorCode_1 ]);
249
+ expect(error_stack_1.error).toBe(error_base);
226
250
  });
227
251
 
228
252
  it('on error_stack_2', () => {
229
- expect(error_stack_2._errorCodes).toEqual([ errorCode_0, errorCode_1, errorCode_2 ]);
253
+ expect(error_stack_2.error).toBe(error_base);
230
254
  });
231
255
 
232
256
  it('on self defined error', () => {
233
- expect(error_selfDefined._errorCodes).toEqual([ dynamo_error_default.errorCode ]);
257
+ expect(error_selfDefined.error).toBeDefined();
234
258
  });
235
259
  });
236
260
 
237
- describe('should have the proper _messages;', () => {
261
+ describe('should have the proper errors;', () => {
238
262
  it('on error_0', () => {
239
- expect(error_0._messages).toEqual([ message_base ]);
263
+ expect(error_0.errors).toEqual([ error_base ]);
240
264
  });
241
265
 
242
266
  it('on error_stack_1', () => {
243
- expect(error_stack_1._messages).toEqual([ message_base, message_1 ]);
267
+ expect(error_stack_1.errors).toEqual([ error_base, error_0 ]);
244
268
  });
245
269
 
246
270
  it('on error_stack_2', () => {
247
- expect(error_stack_2._messages).toEqual([ message_base, message_1, message_2 ]);
271
+ expect(error_stack_2.errors).toEqual([ error_base, error_0, error_stack_1 ]);
248
272
  });
249
273
 
250
274
  it('on self defined error', () => {
251
- expect(error_selfDefined._messages).toEqual([ message_selfDefined ]);
275
+ expect(error_selfDefined?.errors?.length).toBe(1);
252
276
  });
253
277
  });
254
278
 
255
- describe('should have the proper __userMessages;', () => {
279
+ describe('should have proper handled;', () => {
256
280
  it('on error_0', () => {
257
- expect(error_0.__userMessages).toEqual([ userMessageResult_0 ]);
281
+ expect(error_0.___handled).toBe(false);
258
282
  });
259
283
 
260
284
  it('on error_stack_1', () => {
261
- expect(error_stack_1.__userMessages).toEqual([ userMessageResult_0, dynamo_error_default.userMessage ]);
285
+ expect(error_stack_1.___handled).toBe(true);
262
286
  });
263
287
 
264
288
  it('on error_stack_2', () => {
265
- expect(error_stack_2.__userMessages).toEqual([ userMessageResult_0, dynamo_error_default.userMessage, userMessageResult_2 ]);
289
+ expect(error_stack_2.___handled).toBe(true);
266
290
  });
267
291
 
268
292
  it('on self defined error', () => {
269
- expect(error_selfDefined.__userMessages).toEqual([ dynamo_error_default.userMessage ]);
293
+ expect(error_selfDefined.___handled).toBe(false);
270
294
  });
271
295
  });
272
296
 
273
- describe('should have the proper errors;', () => {
297
+ describe('should have status: undefined;', () => {
274
298
  it('on error_0', () => {
275
- expect(error_0.errors).toEqual([ error_base ]);
299
+ expect(error_0.___status).toBe(undefined);
276
300
  });
277
301
 
278
302
  it('on error_stack_1', () => {
279
- expect(error_stack_1.errors).toEqual([ error_base, error_0 ]);
303
+ expect(error_stack_1.___status).toBe(undefined);
280
304
  });
281
305
 
282
306
  it('on error_stack_2', () => {
283
- expect(error_stack_2.errors).toEqual([ error_base, error_0, error_stack_1 ]);
307
+ expect(error_stack_2.___status).toBe(undefined);
284
308
  });
285
309
 
286
310
  it('on self defined error', () => {
287
- expect(error_selfDefined.errors).toEqual([]);
311
+ expect(error_selfDefined.___status).toBe(undefined);
288
312
  });
289
313
  });
290
314
 
@@ -341,5 +365,309 @@ describe('Dynamo_Error;', () => {
341
365
  expect(error_selfDefined.___issuerService).toBe(dynamo_error_default.issuerService);
342
366
  });
343
367
  });
368
+
369
+ describe('should have get proper simplified;', () => {
370
+ let simplified;
371
+
372
+ describe('on error_0;', () => {
373
+ beforeEach(() => {
374
+ simplified = error_0.getErrorSimplified();
375
+ });
376
+
377
+ it('should be defined', () => {
378
+ expect(simplified).toBeDefined();
379
+ });
380
+
381
+ it('should have error', () => {
382
+ expect(simplified.error).toBeDefined();
383
+ });
384
+
385
+ it('should not have errors', () => {
386
+ expect(simplified.errors).toBeUndefined();
387
+ });
388
+
389
+ it('should not have simplified.error.error', () => {
390
+ expect((simplified.error as Dynamo_Error)?.error).toBeUndefined();
391
+ });
392
+
393
+ it('should not have simplified.error.errors', () => {
394
+ expect((simplified.error as Dynamo_Error)?.errors).toBeUndefined();
395
+ });
396
+ });
397
+
398
+ describe('on error_stack_1;', () => {
399
+ beforeEach(() => {
400
+ simplified = error_stack_1.getErrorSimplified();
401
+ });
402
+
403
+ it('should be defined', () => {
404
+ expect(simplified).toBeDefined();
405
+ });
406
+
407
+ it('should have error', () => {
408
+ expect(simplified.error).toBeDefined();
409
+ });
410
+
411
+ it('should not have errors', () => {
412
+ expect(simplified.errors).toBeUndefined();
413
+ });
414
+
415
+ it('should not have simplified.error.error', () => {
416
+ expect((simplified.error as Dynamo_Error)?.error).toBeUndefined();
417
+ });
418
+
419
+ it('should not have simplified.error.errors', () => {
420
+ expect((simplified.error as Dynamo_Error)?.errors).toBeUndefined();
421
+ });
422
+ });
423
+
424
+ describe('on error_stack_2;', () => {
425
+ beforeEach(() => {
426
+ simplified = error_stack_2.getErrorSimplified();
427
+ });
428
+
429
+ it('should be defined', () => {
430
+ expect(simplified).toBeDefined();
431
+ });
432
+
433
+ it('should have error', () => {
434
+ expect(simplified.error).toBeDefined();
435
+ });
436
+
437
+ it('should not have errors', () => {
438
+ expect(simplified.errors).toBeUndefined();
439
+ });
440
+
441
+ it('should not have simplified.error.error', () => {
442
+ expect((simplified.error as Dynamo_Error)?.error).toBeUndefined();
443
+ });
444
+
445
+ it('should not have simplified.error.errors', () => {
446
+ expect((simplified.error as Dynamo_Error)?.errors).toBeUndefined();
447
+ });
448
+ });
449
+
450
+ describe('on self defined error;', () => {
451
+ beforeEach(() => {
452
+ simplified = error_selfDefined.getErrorSimplified();
453
+ });
454
+
455
+ it('should be defined', () => {
456
+ expect(simplified).toBeDefined();
457
+ });
458
+
459
+ it('should have error', () => {
460
+ expect(simplified.error).toBeDefined();
461
+ });
462
+
463
+ it('should not have errors', () => {
464
+ expect(simplified.errors).toBeUndefined();
465
+ });
466
+
467
+ it('should not have simplified.error.error', () => {
468
+ expect((simplified.error as Dynamo_Error)?.error).toBeUndefined();
469
+ });
470
+
471
+ it('should not have simplified.error.errors', () => {
472
+ expect((simplified.error as Dynamo_Error)?.errors).toBeUndefined();
473
+ });
474
+ });
475
+ });
476
+
477
+ describe('should have get proper flat;', () => {
478
+ let flat;
479
+
480
+ describe('on error_0;', () => {
481
+ beforeEach(() => {
482
+ flat = error_0.getErrorsFlat();
483
+ });
484
+
485
+ it('should be defined', () => {
486
+ expect(flat).toBeDefined();
487
+ });
488
+
489
+ it('should have error', () => {
490
+ expect(flat.error).toBeDefined();
491
+ });
492
+
493
+ describe('errors...;', () => {
494
+ it('should have errors', () => {
495
+ expect(flat?.errors).toBeDefined();
496
+ });
497
+
498
+ it('should have 1 errors', () => {
499
+ expect(flat?.errors?.length).toBe(1);
500
+ });
501
+
502
+ flat?.errors?.forEach((error: Dynamo_Error, index: number) => {
503
+ describe(`on error[${index}];`, () => {
504
+ it('should be', () => {
505
+ expect(error).toBeDefined();
506
+ });
507
+
508
+ it(`should have error[${index}].error`, () => {
509
+ expect(error.error).toBeDefined();
510
+ });
511
+
512
+ it(`should not have error[${index}].errors`, () => {
513
+ expect(error.errors).toBeUndefined();
514
+ });
515
+
516
+ it(`should not have error[${index}].error.error`, () => {
517
+ expect((error.error as Dynamo_Error)?.error).toBeUndefined();
518
+ });
519
+
520
+ it(`should not have error[${index}].error.errors`, () => {
521
+ expect((error.error as Dynamo_Error)?.errors).toBeUndefined();
522
+ });
523
+ });
524
+ });
525
+ });
526
+ });
527
+
528
+ describe('on error_stack_1;', () => {
529
+ beforeEach(() => {
530
+ flat = error_stack_1.getErrorsFlat();
531
+ });
532
+
533
+ it('should be defined', () => {
534
+ expect(flat).toBeDefined();
535
+ });
536
+
537
+ it('should have error', () => {
538
+ expect(flat.error).toBeDefined();
539
+ });
540
+
541
+ describe('errors...;', () => {
542
+ it('should have errors', () => {
543
+ expect(flat?.errors).toBeDefined();
544
+ });
545
+
546
+ it('should have 2 errors', () => {
547
+ expect(flat?.errors?.length).toBe(2);
548
+ });
549
+
550
+ flat?.errors?.forEach((error: Dynamo_Error, index: number) => {
551
+ describe(`on error[${index}];`, () => {
552
+ it('should be', () => {
553
+ expect(error).toBeDefined();
554
+ });
555
+
556
+ it(`should have error[${index}].error`, () => {
557
+ expect(error.error).toBeDefined();
558
+ });
559
+
560
+ it(`should not have error[${index}].errors`, () => {
561
+ expect(error.errors).toBeUndefined();
562
+ });
563
+
564
+ it('should not have error[${index}].error.error', () => {
565
+ expect((error.error as Dynamo_Error)?.error).toBeUndefined();
566
+ });
567
+
568
+ it('should not have error[${index}].error.errors', () => {
569
+ expect((error.error as Dynamo_Error)?.errors).toBeUndefined();
570
+ });
571
+ });
572
+ });
573
+ });
574
+ });
575
+
576
+ describe('on error_stack_2;', () => {
577
+ beforeEach(() => {
578
+ flat = error_stack_2.getErrorsFlat();
579
+ });
580
+
581
+ it('should be defined', () => {
582
+ expect(flat).toBeDefined();
583
+ });
584
+
585
+ it('should have error', () => {
586
+ expect(flat.error).toBeDefined();
587
+ });
588
+
589
+ describe('errors...;', () => {
590
+ it('should have errors', () => {
591
+ expect(flat?.errors).toBeDefined();
592
+ });
593
+
594
+ it('should have 3 errors', () => {
595
+ expect(flat?.errors?.length).toBe(3);
596
+ });
597
+
598
+ flat?.errors?.forEach((error: Dynamo_Error, index: number) => {
599
+ describe(`on error[${index}];`, () => {
600
+ it('should be', () => {
601
+ expect(error).toBeDefined();
602
+ });
603
+
604
+ it(`should have error[${index}].error`, () => {
605
+ expect(error.error).toBeDefined();
606
+ });
607
+
608
+ it(`should not have error[${index}].errors`, () => {
609
+ expect(error.errors).toBeUndefined();
610
+ });
611
+
612
+ it(`should not have error[${index}].error.error`, () => {
613
+ expect((error.error as Dynamo_Error)?.error).toBeUndefined();
614
+ });
615
+
616
+ it(`should not have error[${index}].error.errors`, () => {
617
+ expect((error.error as Dynamo_Error)?.errors).toBeUndefined();
618
+ });
619
+ });
620
+ });
621
+ });
622
+ });
623
+
624
+ describe('on self defined error;', () => {
625
+ beforeEach(() => {
626
+ flat = error_selfDefined.getErrorsFlat();
627
+ });
628
+
629
+ it('should be defined', () => {
630
+ expect(flat).toBeDefined();
631
+ });
632
+
633
+ it('should have error', () => {
634
+ expect(flat.error).toBeDefined();
635
+ });
636
+
637
+ describe('errors...;', () => {
638
+ it('should have errors', () => {
639
+ expect(flat?.errors).toBeDefined();
640
+ });
641
+
642
+ it('should have 1 errors', () => {
643
+ expect(flat?.errors?.length).toBe(1);
644
+ });
645
+
646
+ flat?.errors?.forEach((error: Dynamo_Error, index: number) => {
647
+ describe(`on error[${index}];`, () => {
648
+ it('should be', () => {
649
+ expect(error).toBeDefined();
650
+ });
651
+
652
+ it(`should have error[${index}].error`, () => {
653
+ expect(error.error).toBeDefined();
654
+ });
655
+
656
+ it(`should not have error[${index}].errors`, () => {
657
+ expect(error.errors).toBeUndefined();
658
+ });
659
+
660
+ it(`should not have error[${index}].error.error`, () => {
661
+ expect((error.error as Dynamo_Error)?.error).toBeUndefined();
662
+ });
663
+
664
+ it(`should not have error[${index}].error.errors`, () => {
665
+ expect((error.error as Dynamo_Error)?.errors).toBeUndefined();
666
+ });
667
+ });
668
+ });
669
+ });
670
+ });
671
+ });
344
672
  });
345
673