@futdevpro/fsm-dynamo 1.15.1 → 1.15.2

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 (216) hide show
  1. package/.cursor/rules/__assistant_guide.mdc +30 -0
  2. package/.cursor/rules/__main.mdc +62 -0
  3. package/.cursor/rules/_ag_backend-structure.mdc +86 -0
  4. package/.cursor/rules/_ag_backend.mdc +16 -0
  5. package/.cursor/rules/_ag_debug.mdc +8 -0
  6. package/.cursor/rules/_ag_documentation_writing_rules.mdc +372 -0
  7. package/.cursor/rules/_ag_file-refactoring.mdc +113 -0
  8. package/.cursor/rules/_ag_fixes_rules.mdc +6 -0
  9. package/.cursor/rules/_ag_frontend-structure.mdc +87 -0
  10. package/.cursor/rules/_ag_frontend.mdc +40 -0
  11. package/.cursor/rules/_ag_import-rules.mdc +45 -0
  12. package/.cursor/rules/_ag_naming.mdc +116 -0
  13. package/.cursor/rules/_ag_running_commands.mdc +5 -0
  14. package/.cursor/rules/_ag_server-controller.mdc +6 -0
  15. package/.cursor/rules/_ag_should-be.mdc +7 -0
  16. package/.cursor/rules/_ag_swearing.mdc +47 -0
  17. package/.cursor/rules/ai_development_guide.md +61 -0
  18. package/.cursor/rules/ai_directives.md +114 -0
  19. package/.cursor/rules/cursor-rules.md +160 -0
  20. package/.cursor/rules/default-command.mdc +229 -0
  21. package/.cursor/rules/error_code_pattern.md +40 -0
  22. package/.cursor/rules/saved rule mcp server use.md +16 -0
  23. package/build/_modules/data-handler/_models/data-handler.control-model.js +17 -17
  24. package/build/_modules/data-handler/_models/data-handler.control-model.js.map +1 -1
  25. package/futdevpro-fsm-dynamo-01.15.2.tgz +0 -0
  26. package/package.json +2 -2
  27. package/src/_modules/data-handler/_models/data-handler.control-model.ts +17 -17
  28. package/build/_collections/utils/array.util.spec.d.ts +0 -2
  29. package/build/_collections/utils/array.util.spec.d.ts.map +0 -1
  30. package/build/_collections/utils/array.util.spec.js +0 -239
  31. package/build/_collections/utils/array.util.spec.js.map +0 -1
  32. package/build/_collections/utils/log.util.spec.d.ts +0 -2
  33. package/build/_collections/utils/log.util.spec.d.ts.map +0 -1
  34. package/build/_collections/utils/log.util.spec.js +0 -633
  35. package/build/_collections/utils/log.util.spec.js.map +0 -1
  36. package/build/_collections/utils/math/box-bounds.util.spec.d.ts +0 -2
  37. package/build/_collections/utils/math/box-bounds.util.spec.d.ts.map +0 -1
  38. package/build/_collections/utils/math/box-bounds.util.spec.js +0 -97
  39. package/build/_collections/utils/math/box-bounds.util.spec.js.map +0 -1
  40. package/build/_collections/utils/math/math.util.spec.d.ts +0 -2
  41. package/build/_collections/utils/math/math.util.spec.d.ts.map +0 -1
  42. package/build/_collections/utils/math/math.util.spec.js +0 -80
  43. package/build/_collections/utils/math/math.util.spec.js.map +0 -1
  44. package/build/_collections/utils/math/random.util.spec.d.ts +0 -2
  45. package/build/_collections/utils/math/random.util.spec.d.ts.map +0 -1
  46. package/build/_collections/utils/math/random.util.spec.js +0 -75
  47. package/build/_collections/utils/math/random.util.spec.js.map +0 -1
  48. package/build/_collections/utils/math/trigonometry.util.spec.d.ts +0 -2
  49. package/build/_collections/utils/math/trigonometry.util.spec.d.ts.map +0 -1
  50. package/build/_collections/utils/math/trigonometry.util.spec.js +0 -49
  51. package/build/_collections/utils/math/trigonometry.util.spec.js.map +0 -1
  52. package/build/_collections/utils/math/vector2.util.spec.d.ts +0 -2
  53. package/build/_collections/utils/math/vector2.util.spec.d.ts.map +0 -1
  54. package/build/_collections/utils/math/vector2.util.spec.js +0 -82
  55. package/build/_collections/utils/math/vector2.util.spec.js.map +0 -1
  56. package/build/_collections/utils/object.util.spec.d.ts +0 -2
  57. package/build/_collections/utils/object.util.spec.d.ts.map +0 -1
  58. package/build/_collections/utils/object.util.spec.js +0 -506
  59. package/build/_collections/utils/object.util.spec.js.map +0 -1
  60. package/build/_collections/utils/regex/password-regex.util.spec.d.ts +0 -2
  61. package/build/_collections/utils/regex/password-regex.util.spec.d.ts.map +0 -1
  62. package/build/_collections/utils/regex/password-regex.util.spec.js +0 -44
  63. package/build/_collections/utils/regex/password-regex.util.spec.js.map +0 -1
  64. package/build/_collections/utils/regex/regex.util.spec.d.ts +0 -2
  65. package/build/_collections/utils/regex/regex.util.spec.d.ts.map +0 -1
  66. package/build/_collections/utils/regex/regex.util.spec.js +0 -40
  67. package/build/_collections/utils/regex/regex.util.spec.js.map +0 -1
  68. package/build/_collections/utils/regex/username-regex.util.spec.d.ts +0 -2
  69. package/build/_collections/utils/regex/username-regex.util.spec.d.ts.map +0 -1
  70. package/build/_collections/utils/regex/username-regex.util.spec.js +0 -59
  71. package/build/_collections/utils/regex/username-regex.util.spec.js.map +0 -1
  72. package/build/_collections/utils/round-list.util.spec.d.ts +0 -2
  73. package/build/_collections/utils/round-list.util.spec.d.ts.map +0 -1
  74. package/build/_collections/utils/round-list.util.spec.js +0 -65
  75. package/build/_collections/utils/round-list.util.spec.js.map +0 -1
  76. package/build/_collections/utils/stack.util.spec.d.ts +0 -2
  77. package/build/_collections/utils/stack.util.spec.d.ts.map +0 -1
  78. package/build/_collections/utils/stack.util.spec.js +0 -290
  79. package/build/_collections/utils/stack.util.spec.js.map +0 -1
  80. package/build/_collections/utils/string-case.util.spec.d.ts +0 -2
  81. package/build/_collections/utils/string-case.util.spec.d.ts.map +0 -1
  82. package/build/_collections/utils/string-case.util.spec.js +0 -360
  83. package/build/_collections/utils/string-case.util.spec.js.map +0 -1
  84. package/build/_collections/utils/string.util.spec.d.ts +0 -2
  85. package/build/_collections/utils/string.util.spec.d.ts.map +0 -1
  86. package/build/_collections/utils/string.util.spec.js +0 -860
  87. package/build/_collections/utils/string.util.spec.js.map +0 -1
  88. package/build/_collections/utils/time.util.spec.d.ts +0 -2
  89. package/build/_collections/utils/time.util.spec.d.ts.map +0 -1
  90. package/build/_collections/utils/time.util.spec.js +0 -38
  91. package/build/_collections/utils/time.util.spec.js.map +0 -1
  92. package/build/_collections/utils/type-cloning-facility.util.spec.d.ts +0 -2
  93. package/build/_collections/utils/type-cloning-facility.util.spec.d.ts.map +0 -1
  94. package/build/_collections/utils/type-cloning-facility.util.spec.js +0 -41
  95. package/build/_collections/utils/type-cloning-facility.util.spec.js.map +0 -1
  96. package/build/_collections/utils/uuid.util.spec.d.ts +0 -2
  97. package/build/_collections/utils/uuid.util.spec.d.ts.map +0 -1
  98. package/build/_collections/utils/uuid.util.spec.js +0 -29
  99. package/build/_collections/utils/uuid.util.spec.js.map +0 -1
  100. package/build/_models/control-models/data-model-params.control-model.spec.d.ts +0 -2
  101. package/build/_models/control-models/data-model-params.control-model.spec.d.ts.map +0 -1
  102. package/build/_models/control-models/data-model-params.control-model.spec.js +0 -64
  103. package/build/_models/control-models/data-model-params.control-model.spec.js.map +0 -1
  104. package/build/_models/control-models/data-property-params.control-model.spec.d.ts +0 -2
  105. package/build/_models/control-models/data-property-params.control-model.spec.d.ts.map +0 -1
  106. package/build/_models/control-models/data-property-params.control-model.spec.js +0 -74
  107. package/build/_models/control-models/data-property-params.control-model.spec.js.map +0 -1
  108. package/build/_models/control-models/error.control-model.spec.d.ts +0 -2
  109. package/build/_models/control-models/error.control-model.spec.d.ts.map +0 -1
  110. package/build/_models/control-models/error.control-model.spec.js +0 -664
  111. package/build/_models/control-models/error.control-model.spec.js.map +0 -1
  112. package/build/_models/control-models/poll.control-model.spec.d.ts +0 -2
  113. package/build/_models/control-models/poll.control-model.spec.d.ts.map +0 -1
  114. package/build/_models/control-models/poll.control-model.spec.js +0 -57
  115. package/build/_models/control-models/poll.control-model.spec.js.map +0 -1
  116. package/build/_models/control-models/range-value.control-model.spec.d.ts +0 -2
  117. package/build/_models/control-models/range-value.control-model.spec.d.ts.map +0 -1
  118. package/build/_models/control-models/range-value.control-model.spec.js +0 -163
  119. package/build/_models/control-models/range-value.control-model.spec.js.map +0 -1
  120. package/build/_modules/crypto/_collections/crypto.util.edge.spec.d.ts +0 -2
  121. package/build/_modules/crypto/_collections/crypto.util.edge.spec.d.ts.map +0 -1
  122. package/build/_modules/crypto/_collections/crypto.util.edge.spec.js +0 -551
  123. package/build/_modules/crypto/_collections/crypto.util.edge.spec.js.map +0 -1
  124. package/build/_modules/crypto/_collections/crypto.util.extra.spec.d.ts +0 -2
  125. package/build/_modules/crypto/_collections/crypto.util.extra.spec.d.ts.map +0 -1
  126. package/build/_modules/crypto/_collections/crypto.util.extra.spec.js +0 -555
  127. package/build/_modules/crypto/_collections/crypto.util.extra.spec.js.map +0 -1
  128. package/build/_modules/crypto/_collections/crypto.util.simple.spec.d.ts +0 -2
  129. package/build/_modules/crypto/_collections/crypto.util.simple.spec.d.ts.map +0 -1
  130. package/build/_modules/crypto/_collections/crypto.util.simple.spec.js +0 -429
  131. package/build/_modules/crypto/_collections/crypto.util.simple.spec.js.map +0 -1
  132. package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts +0 -2
  133. package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts.map +0 -1
  134. package/build/_modules/custom-data/_models/cud.data-model.spec.js +0 -35
  135. package/build/_modules/custom-data/_models/cud.data-model.spec.js.map +0 -1
  136. package/build/_modules/location/_collections/loc-regions.util.spec.d.ts +0 -2
  137. package/build/_modules/location/_collections/loc-regions.util.spec.d.ts.map +0 -1
  138. package/build/_modules/location/_collections/loc-regions.util.spec.js +0 -51
  139. package/build/_modules/location/_collections/loc-regions.util.spec.js.map +0 -1
  140. package/build/_modules/location/_collections/loc.util.spec.d.ts +0 -2
  141. package/build/_modules/location/_collections/loc.util.spec.d.ts.map +0 -1
  142. package/build/_modules/location/_collections/loc.util.spec.js +0 -39
  143. package/build/_modules/location/_collections/loc.util.spec.js.map +0 -1
  144. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts +0 -2
  145. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts.map +0 -1
  146. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js +0 -33
  147. package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js.map +0 -1
  148. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts +0 -2
  149. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts.map +0 -1
  150. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js +0 -36
  151. package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js.map +0 -1
  152. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts +0 -2
  153. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts.map +0 -1
  154. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js +0 -35
  155. package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js.map +0 -1
  156. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts +0 -2
  157. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts.map +0 -1
  158. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js +0 -31
  159. package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js.map +0 -1
  160. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts +0 -2
  161. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts.map +0 -1
  162. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js +0 -54
  163. package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js.map +0 -1
  164. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts +0 -2
  165. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts.map +0 -1
  166. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js +0 -26
  167. package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js.map +0 -1
  168. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts +0 -2
  169. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts.map +0 -1
  170. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js +0 -50
  171. package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js.map +0 -1
  172. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts +0 -2
  173. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts.map +0 -1
  174. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js +0 -23
  175. package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js.map +0 -1
  176. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts +0 -2
  177. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts.map +0 -1
  178. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js +0 -38
  179. package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js.map +0 -1
  180. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts +0 -2
  181. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts.map +0 -1
  182. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js +0 -20
  183. package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js.map +0 -1
  184. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts +0 -2
  185. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts.map +0 -1
  186. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js +0 -50
  187. package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js.map +0 -1
  188. package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts +0 -2
  189. package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts.map +0 -1
  190. package/build/_modules/socket/_models/sck-client-params.control-model.spec.js +0 -54
  191. package/build/_modules/socket/_models/sck-client-params.control-model.spec.js.map +0 -1
  192. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts +0 -2
  193. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts.map +0 -1
  194. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js +0 -49
  195. package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js.map +0 -1
  196. package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts +0 -2
  197. package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts.map +0 -1
  198. package/build/_modules/socket/_services/sck-client.service-base.spec.js +0 -82
  199. package/build/_modules/socket/_services/sck-client.service-base.spec.js.map +0 -1
  200. package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts +0 -2
  201. package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts.map +0 -1
  202. package/build/_modules/usage/_models/usg-action.control-model.spec.js +0 -24
  203. package/build/_modules/usage/_models/usg-action.control-model.spec.js.map +0 -1
  204. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts +0 -2
  205. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts.map +0 -1
  206. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js +0 -33
  207. package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js.map +0 -1
  208. package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts +0 -2
  209. package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts.map +0 -1
  210. package/build/_modules/usage/_models/usg-data.control-model.spec.js +0 -37
  211. package/build/_modules/usage/_models/usg-data.control-model.spec.js.map +0 -1
  212. package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts +0 -2
  213. package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts.map +0 -1
  214. package/build/_modules/usage/_models/usg-session.data-model.spec.js +0 -82
  215. package/build/_modules/usage/_models/usg-session.data-model.spec.js.map +0 -1
  216. package/futdevpro-fsm-dynamo-01.15.01.tgz +0 -0
@@ -1,633 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const log_style_enum_1 = require("../../_enums/log-style.enum");
4
- const log_util_1 = require("./log.util");
5
- describe('| DyFM_Log', () => {
6
- let originalConsole;
7
- beforeEach(() => {
8
- // Mentsük el az eredeti console metódusokat
9
- originalConsole = {
10
- log: console.log,
11
- error: console.error,
12
- warn: console.warn,
13
- info: console.info
14
- };
15
- // Spy-k beállítása
16
- spyOn(console, 'log');
17
- spyOn(console, 'error');
18
- spyOn(console, 'warn');
19
- spyOn(console, 'info');
20
- });
21
- afterEach(() => {
22
- // Visszaállítjuk az eredeti console metódusokat
23
- console.log = originalConsole.log;
24
- console.error = originalConsole.error;
25
- console.warn = originalConsole.warn;
26
- console.info = originalConsole.info;
27
- });
28
- describe('| Alapvető stílus metódusok', () => {
29
- it('| should set styles correctly using setStyle', () => {
30
- log_util_1.DyFM_Log.setStyle([log_style_enum_1.DyFM_LogStyle.green, log_style_enum_1.DyFM_LogStyle.bold]);
31
- expect(console.log).toHaveBeenCalledWith(log_style_enum_1.DyFM_LogStyle.green + log_style_enum_1.DyFM_LogStyle.bold);
32
- });
33
- it('| should reset styles correctly using resetStyle', () => {
34
- log_util_1.DyFM_Log.resetStyle();
35
- expect(console.log).toHaveBeenCalledWith(log_style_enum_1.DyFM_LogStyle.reset);
36
- });
37
- it('| should add styles to input string using addStyle', () => {
38
- const result = log_util_1.DyFM_Log.addStyle('Hello', [log_style_enum_1.DyFM_LogStyle.green, log_style_enum_1.DyFM_LogStyle.bold]);
39
- expect(result).toBe(log_style_enum_1.DyFM_LogStyle.green + log_style_enum_1.DyFM_LogStyle.bold + 'Hello' + log_style_enum_1.DyFM_LogStyle.reset);
40
- });
41
- it('| should not reset styles if dontReset is true in addStyle', () => {
42
- const result = log_util_1.DyFM_Log.addStyle('Hello', [log_style_enum_1.DyFM_LogStyle.green], true);
43
- expect(result).toBe(log_style_enum_1.DyFM_LogStyle.green + 'Hello');
44
- });
45
- it('| should handle empty styles array in addStyle', () => {
46
- const result = log_util_1.DyFM_Log.addStyle('Hello', []);
47
- expect(result).toBe('Hello' + log_style_enum_1.DyFM_LogStyle.reset);
48
- });
49
- });
50
- describe('| Alapvető log metódusok', () => {
51
- it('| should log success message with styles', () => {
52
- log_util_1.DyFM_Log.success('Success message');
53
- expect(console.log).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.successStyle}Success message${log_style_enum_1.DyFM_LogStyle.reset}`);
54
- });
55
- it('| should log success message with optional parameters', () => {
56
- log_util_1.DyFM_Log.success('Success message', 'param1', 123);
57
- expect(console.log).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.successStyle}Success message`, 'param1', 123, log_style_enum_1.DyFM_LogStyle.reset);
58
- });
59
- it('| should log error message with styles', () => {
60
- log_util_1.DyFM_Log.error('Error message');
61
- expect(console.error).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.errorStyle}Error message${log_style_enum_1.DyFM_LogStyle.reset}`);
62
- });
63
- it('| should log error message with optional parameters', () => {
64
- log_util_1.DyFM_Log.error('Error message', 'param1', 123);
65
- expect(console.error).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.errorStyle}Error message`, 'param1', 123, log_style_enum_1.DyFM_LogStyle.reset);
66
- });
67
- it('| should log warning message with styles', () => {
68
- log_util_1.DyFM_Log.warn('Warning message');
69
- expect(console.warn).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.warnStyle}Warning message${log_style_enum_1.DyFM_LogStyle.reset}`);
70
- });
71
- it('| should log warning message with optional parameters', () => {
72
- log_util_1.DyFM_Log.warn('Warning message', 'param1', 123);
73
- expect(console.warn).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.warnStyle}Warning message`, 'param1', 123, log_style_enum_1.DyFM_LogStyle.reset);
74
- });
75
- it('| should log info message with styles', () => {
76
- log_util_1.DyFM_Log.info('Info message');
77
- expect(console.info).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.infoStyle}Info message${log_style_enum_1.DyFM_LogStyle.reset}`);
78
- });
79
- it('| should log info message with optional parameters', () => {
80
- log_util_1.DyFM_Log.info('Info message', 'param1', 123);
81
- expect(console.info).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.infoStyle}Info message`, 'param1', 123, log_style_enum_1.DyFM_LogStyle.reset);
82
- });
83
- it('| should log message without styles using log', () => {
84
- log_util_1.DyFM_Log.log('Log message');
85
- expect(console.log).toHaveBeenCalledWith('Log message');
86
- });
87
- it('| should log message with optional parameters using log', () => {
88
- log_util_1.DyFM_Log.log('Log message', 'param1', 123);
89
- expect(console.log).toHaveBeenCalledWith('Log message', 'param1', 123);
90
- });
91
- });
92
- describe('| Kiemelt log metódusok', () => {
93
- it('| should return highlighted message with styles', () => {
94
- const result = log_util_1.DyFM_Log.getHighlighted('Highlighted message');
95
- expect(result).toBe(`${log_util_1.DyFM_Log.highlightedStyle}Highlighted message${log_style_enum_1.DyFM_LogStyle.reset}`);
96
- });
97
- it('| should log highlighted message with styles', () => {
98
- log_util_1.DyFM_Log.highlighted('Highlighted message');
99
- expect(console.log).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.highlightedStyle}Highlighted message${log_style_enum_1.DyFM_LogStyle.reset}`);
100
- });
101
- it('| should log highlighted message with optional parameters', () => {
102
- log_util_1.DyFM_Log.highlighted('Highlighted message', 'param1', 123);
103
- expect(console.log).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.highlightedStyle}Highlighted message`, 'param1', 123, log_style_enum_1.DyFM_LogStyle.reset);
104
- });
105
- });
106
- describe('| Test log metódusok', () => {
107
- it('| should log test message with solid borders', () => {
108
- log_util_1.DyFM_Log.testLog('Test message');
109
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
110
- '\n\n Test message', '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
111
- });
112
- it('| should log test info message with solid borders', () => {
113
- log_util_1.DyFM_Log.testInfo('Test info message');
114
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
115
- '\n' + log_util_1.DyFM_Log.h_test +
116
- '\n\n Test info message', '\n\n' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
117
- });
118
- it('| should log test error message with solid borders', () => {
119
- log_util_1.DyFM_Log.testError('Test error message');
120
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
121
- '\n' + log_util_1.DyFM_Log.h_test +
122
- '\n\n Test error message', '\n\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
123
- });
124
- it('| should log test warning message with solid borders', () => {
125
- log_util_1.DyFM_Log.testWarn('Test warning message');
126
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
127
- '\n' + log_util_1.DyFM_Log.h_test +
128
- '\n\n Test warning message', '\n\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
129
- });
130
- it('| should log test success message with solid borders', () => {
131
- log_util_1.DyFM_Log.testSuccess('Test success message');
132
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
133
- '\n' + log_util_1.DyFM_Log.h_test +
134
- '\n\n Test success message', '\n\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
135
- });
136
- });
137
- describe('| Highlighted log metódusok', () => {
138
- it('| should log highlighted log message with decorative borders', () => {
139
- log_util_1.DyFM_Log.highlightedLog('Highlighted log message');
140
- expect(console.log).toHaveBeenCalledWith('\n\n' + log_util_1.DyFM_Log.h_before +
141
- '\n ' + log_util_1.DyFM_Log.h_before +
142
- '\n ' + log_util_1.DyFM_Log.h_before +
143
- '\n\n Highlighted log message', '\n\n ' + log_util_1.DyFM_Log.h_after +
144
- '\n ' + log_util_1.DyFM_Log.h_after +
145
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n');
146
- });
147
- it('| should log highlighted info message with decorative borders', () => {
148
- log_util_1.DyFM_Log.highlightedInfo('Highlighted info message');
149
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
150
- '\n\n' + log_util_1.DyFM_Log.h_before +
151
- '\n ' + log_util_1.DyFM_Log.h_before +
152
- '\n ' + log_util_1.DyFM_Log.h_before +
153
- '\n\n Highlighted info message', '\n\n ' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_after +
154
- '\n ' + log_util_1.DyFM_Log.h_after +
155
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
156
- });
157
- it('| should log highlighted error message with decorative borders', () => {
158
- log_util_1.DyFM_Log.highlightedError('Highlighted error message');
159
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
160
- '\n\n' + log_util_1.DyFM_Log.h_before +
161
- '\n ' + log_util_1.DyFM_Log.h_before +
162
- '\n ' + log_util_1.DyFM_Log.h_before +
163
- '\n\n Highlighted error message', '\n\n ' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_after +
164
- '\n ' + log_util_1.DyFM_Log.h_after +
165
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
166
- });
167
- it('| should log highlighted warning message with decorative borders', () => {
168
- log_util_1.DyFM_Log.highlightedWarn('Highlighted warning message');
169
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
170
- '\n\n' + log_util_1.DyFM_Log.h_before +
171
- '\n ' + log_util_1.DyFM_Log.h_before +
172
- '\n ' + log_util_1.DyFM_Log.h_before +
173
- '\n\n Highlighted warning message', '\n\n ' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_after +
174
- '\n ' + log_util_1.DyFM_Log.h_after +
175
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
176
- });
177
- it('| should log highlighted success message with decorative borders', () => {
178
- log_util_1.DyFM_Log.highlightedSuccess('Highlighted success message');
179
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
180
- '\n\n' + log_util_1.DyFM_Log.h_before +
181
- '\n ' + log_util_1.DyFM_Log.h_before +
182
- '\n ' + log_util_1.DyFM_Log.h_before +
183
- '\n\n Highlighted success message', '\n\n ' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_after +
184
- '\n ' + log_util_1.DyFM_Log.h_after +
185
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
186
- });
187
- });
188
- describe('| Stílus eltávolítás és csendesítés', () => {
189
- it('| should remove log styles from message', () => {
190
- const styledMessage = `${log_style_enum_1.DyFM_LogStyle.green}Styled message${log_style_enum_1.DyFM_LogStyle.reset}`;
191
- const result = log_util_1.DyFM_Log.removeLogStyles(styledMessage);
192
- expect(result).toBe('Styled message');
193
- });
194
- it('| should handle message without styles in removeLogStyles', () => {
195
- const plainMessage = 'Plain message';
196
- const result = log_util_1.DyFM_Log.removeLogStyles(plainMessage);
197
- expect(result).toBe('Plain message');
198
- });
199
- it('| should silence all logs', () => {
200
- // Store original console methods
201
- const originalLog = console.log;
202
- const originalError = console.error;
203
- const originalWarn = console.warn;
204
- const originalInfo = console.info;
205
- log_util_1.DyFM_Log.silenceConsole();
206
- // Test that logs are silenced
207
- console.log('Test');
208
- console.info('Test');
209
- console.warn('Test');
210
- console.error('Test');
211
- // Restore original methods
212
- console.log = originalLog;
213
- console.error = originalError;
214
- console.warn = originalWarn;
215
- console.info = originalInfo;
216
- // The test passes if no errors were thrown during silencing
217
- expect(true).toBe(true);
218
- });
219
- it('| should silence non-error logs', () => {
220
- // Store original console methods
221
- const originalLog = console.log;
222
- const originalError = console.error;
223
- const originalWarn = console.warn;
224
- const originalInfo = console.info;
225
- log_util_1.DyFM_Log.silenceNonErrorLogs();
226
- // Test that non-error logs are silenced but error logs work
227
- console.log('Test');
228
- console.info('Test');
229
- console.warn('Test');
230
- console.error('Test');
231
- // Restore original methods
232
- console.log = originalLog;
233
- console.error = originalError;
234
- console.warn = originalWarn;
235
- console.info = originalInfo;
236
- // The test passes if no errors were thrown during silencing
237
- expect(true).toBe(true);
238
- });
239
- it('| should silence logs using silenceLogs', () => {
240
- // Store original console method
241
- const originalLog = console.log;
242
- log_util_1.DyFM_Log.silenceLogs();
243
- // Test that logs are silenced
244
- console.log('Test');
245
- // Restore original method
246
- console.log = originalLog;
247
- // The test passes if no errors were thrown during silencing
248
- expect(true).toBe(true);
249
- });
250
- });
251
- describe('| Segédfüggvények', () => {
252
- it('| should add breaks and tabs to string parameters', () => {
253
- const params = ['param1', 'param2', 123];
254
- const result = log_util_1.DyFM_Log.addBreaksAndTabsToStringParams(params);
255
- expect(result).toEqual(['\n param1', '\n param2', 123]);
256
- });
257
- it('| should handle empty array in addBreaksAndTabsToStringParams', () => {
258
- const result = log_util_1.DyFM_Log.addBreaksAndTabsToStringParams([]);
259
- expect(result).toEqual([]);
260
- });
261
- it('| should add spaces for each line', () => {
262
- const message = 'Line 1\nLine 2\nLine 3';
263
- const result = log_util_1.DyFM_Log.addSpacesForEachLine(message, 4);
264
- expect(result).toBe('Line 1\n Line 2\n Line 3');
265
- });
266
- it('| should add spaces for each string optional param', () => {
267
- const params = ['param1\nparam2', 'param3', 123];
268
- const result = log_util_1.DyFM_Log.addSpacesForEachStringOptionalParam(params, 4);
269
- expect(result).toEqual(['param1\n param2', 'param3', 123]);
270
- });
271
- });
272
- describe('| Deprecated alias metódusok', () => {
273
- it('| should call success method via logSuccess alias', () => {
274
- log_util_1.DyFM_Log.logSuccess('Success message');
275
- expect(console.log).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.successStyle}Success message${log_style_enum_1.DyFM_LogStyle.reset}`);
276
- });
277
- it('| should call error method via logError alias', () => {
278
- log_util_1.DyFM_Log.logError('Error message');
279
- expect(console.error).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.errorStyle}Error message${log_style_enum_1.DyFM_LogStyle.reset}`);
280
- });
281
- it('| should call warn method via warning alias', () => {
282
- log_util_1.DyFM_Log.warning('Warning message');
283
- expect(console.warn).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.warnStyle}Warning message${log_style_enum_1.DyFM_LogStyle.reset}`);
284
- });
285
- it('| should call warn method via logWarning alias', () => {
286
- log_util_1.DyFM_Log.logWarning('Warning message');
287
- expect(console.warn).toHaveBeenCalledWith(`${log_util_1.DyFM_Log.warnStyle}Warning message${log_style_enum_1.DyFM_LogStyle.reset}`);
288
- });
289
- it('| should call testLog method via test alias', () => {
290
- log_util_1.DyFM_Log.test('Test message');
291
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
292
- '\n\n Test message', '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
293
- });
294
- it('| should call testLog method via T_log alias', () => {
295
- log_util_1.DyFM_Log.T_log('Test message');
296
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
297
- '\n\n Test message', '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
298
- });
299
- it('| should call highlightedLog method via H_log alias', () => {
300
- log_util_1.DyFM_Log.H_log('Highlighted log message');
301
- expect(console.log).toHaveBeenCalledWith('\n\n' + log_util_1.DyFM_Log.h_before +
302
- '\n ' + log_util_1.DyFM_Log.h_before +
303
- '\n ' + log_util_1.DyFM_Log.h_before +
304
- '\n\n Highlighted log message', '\n\n ' + log_util_1.DyFM_Log.h_after +
305
- '\n ' + log_util_1.DyFM_Log.h_after +
306
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n');
307
- });
308
- it('| should call testInfo method via T_info alias', () => {
309
- log_util_1.DyFM_Log.T_info('Test info message');
310
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
311
- '\n' + log_util_1.DyFM_Log.h_test +
312
- '\n\n Test info message', '\n\n' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
313
- });
314
- it('| should call highlightedInfo method via H_info alias', () => {
315
- log_util_1.DyFM_Log.H_info('Highlighted info message');
316
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
317
- '\n\n' + log_util_1.DyFM_Log.h_before +
318
- '\n ' + log_util_1.DyFM_Log.h_before +
319
- '\n ' + log_util_1.DyFM_Log.h_before +
320
- '\n\n Highlighted info message', '\n\n ' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_after +
321
- '\n ' + log_util_1.DyFM_Log.h_after +
322
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
323
- });
324
- it('| should call testError method via T_error alias', () => {
325
- log_util_1.DyFM_Log.T_error('Test error message');
326
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
327
- '\n' + log_util_1.DyFM_Log.h_test +
328
- '\n\n Test error message', '\n\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
329
- });
330
- it('| should call highlightedError method via H_error alias', () => {
331
- log_util_1.DyFM_Log.H_error('Highlighted error message');
332
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
333
- '\n\n' + log_util_1.DyFM_Log.h_before +
334
- '\n ' + log_util_1.DyFM_Log.h_before +
335
- '\n ' + log_util_1.DyFM_Log.h_before +
336
- '\n\n Highlighted error message', '\n\n ' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_after +
337
- '\n ' + log_util_1.DyFM_Log.h_after +
338
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
339
- });
340
- it('| should call testWarn method via T_warn alias', () => {
341
- log_util_1.DyFM_Log.T_warn('Test warning message');
342
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
343
- '\n' + log_util_1.DyFM_Log.h_test +
344
- '\n\n Test warning message', '\n\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
345
- });
346
- it('| should call highlightedWarn method via H_warn alias', () => {
347
- log_util_1.DyFM_Log.H_warn('Highlighted warning message');
348
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
349
- '\n\n' + log_util_1.DyFM_Log.h_before +
350
- '\n ' + log_util_1.DyFM_Log.h_before +
351
- '\n ' + log_util_1.DyFM_Log.h_before +
352
- '\n\n Highlighted warning message', '\n\n ' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_after +
353
- '\n ' + log_util_1.DyFM_Log.h_after +
354
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
355
- });
356
- it('| should call testSuccess method via T_success alias', () => {
357
- log_util_1.DyFM_Log.T_success('Test success message');
358
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
359
- '\n' + log_util_1.DyFM_Log.h_test +
360
- '\n\n Test success message', '\n\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
361
- });
362
- it('| should call highlightedSuccess method via H_success alias', () => {
363
- log_util_1.DyFM_Log.H_success('Highlighted success message');
364
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
365
- '\n\n' + log_util_1.DyFM_Log.h_before +
366
- '\n ' + log_util_1.DyFM_Log.h_before +
367
- '\n ' + log_util_1.DyFM_Log.h_before +
368
- '\n\n Highlighted success message', '\n\n ' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_after +
369
- '\n ' + log_util_1.DyFM_Log.h_after +
370
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
371
- });
372
- });
373
- describe('| Small log metódusok', () => {
374
- it('| should log small log message with small borders', () => {
375
- log_util_1.DyFM_Log.smallLog('Small log message');
376
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
377
- '\n Small log message', '\n' + log_util_1.DyFM_Log.h_small);
378
- });
379
- it('| should log small log message with line breaks in message', () => {
380
- log_util_1.DyFM_Log.smallLog('Small log\nmessage with\nline breaks');
381
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
382
- '\n Small log\n message with\n line breaks', '\n' + log_util_1.DyFM_Log.h_small);
383
- });
384
- it('| should log small info message with small borders', () => {
385
- log_util_1.DyFM_Log.smallInfo('Small info message');
386
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_small +
387
- '\n Small info message', '\n' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
388
- });
389
- it('| should log small error message with small borders', () => {
390
- log_util_1.DyFM_Log.smallError('Small error message');
391
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small +
392
- '\n Small error message', '\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
393
- });
394
- it('| should log small error message with line breaks in message', () => {
395
- log_util_1.DyFM_Log.smallError('Small error\nmessage with\nline breaks');
396
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small +
397
- '\n Small error\n message with\n line breaks', '\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
398
- });
399
- it('| should log small warning message with small borders', () => {
400
- log_util_1.DyFM_Log.smallWarn('Small warning message');
401
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small +
402
- '\n Small warning message', '\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
403
- });
404
- it('| should log small warning message with line breaks in message', () => {
405
- log_util_1.DyFM_Log.smallWarn('Small warning\nmessage with\nline breaks');
406
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small +
407
- '\n Small warning\n message with\n line breaks', '\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
408
- });
409
- it('| should log small warning message with optional parameters', () => {
410
- log_util_1.DyFM_Log.smallWarn('Small warning message', 'param1', 123);
411
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small +
412
- '\n Small warning message', 'param1', 123, '\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
413
- });
414
- it('| should log small success message with small borders', () => {
415
- log_util_1.DyFM_Log.smallSuccess('Small success message');
416
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small +
417
- '\n Small success message', '\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
418
- });
419
- it('| should log small success message with line breaks in message', () => {
420
- log_util_1.DyFM_Log.smallSuccess('Small success\nmessage with\nline breaks');
421
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
422
- log_util_1.DyFM_Log.h_small +
423
- '\n Small success\n message with\n line breaks', '\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
424
- });
425
- it('| should log small success message with optional parameters', () => {
426
- log_util_1.DyFM_Log.smallSuccess('Small success message', 'param1', 123);
427
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small +
428
- '\n Small success message', 'param1', 123, '\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
429
- });
430
- });
431
- describe('| Line breaks within extra logs', () => {
432
- it('| should handle line breaks in test log message', () => {
433
- log_util_1.DyFM_Log.testLog('Test message\nwith line\nbreaks');
434
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
435
- '\n\n Test message\n with line\n breaks', '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
436
- });
437
- it('| should handle line breaks in test info message', () => {
438
- log_util_1.DyFM_Log.testInfo('Test info\nmessage with\nline breaks');
439
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
440
- '\n' + log_util_1.DyFM_Log.h_test +
441
- '\n\n Test info\n message with\n line breaks', '\n\n' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
442
- });
443
- it('| should handle line breaks in test error message', () => {
444
- log_util_1.DyFM_Log.testError('Test error\nmessage with\nline breaks');
445
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
446
- '\n' + log_util_1.DyFM_Log.h_test +
447
- '\n\n Test error\n message with\n line breaks', '\n\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
448
- });
449
- it('| should handle line breaks in test warning message', () => {
450
- log_util_1.DyFM_Log.testWarn('Test warning\nmessage with\nline breaks');
451
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
452
- '\n' + log_util_1.DyFM_Log.h_test +
453
- '\n\n Test warning\n message with\n line breaks', '\n\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
454
- });
455
- it('| should handle line breaks in test success message', () => {
456
- log_util_1.DyFM_Log.testSuccess('Test success\nmessage with\nline breaks');
457
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
458
- '\n' + log_util_1.DyFM_Log.h_test +
459
- '\n\n Test success\n message with\n line breaks', '\n\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_test + '\n', log_style_enum_1.DyFM_LogStyle.reset);
460
- });
461
- it('| should handle line breaks in highlighted log message', () => {
462
- log_util_1.DyFM_Log.highlightedLog('Highlighted log\nmessage with\nline breaks');
463
- expect(console.log).toHaveBeenCalledWith('\n\n' + log_util_1.DyFM_Log.h_before +
464
- '\n ' + log_util_1.DyFM_Log.h_before +
465
- '\n ' + log_util_1.DyFM_Log.h_before +
466
- '\n\n Highlighted log\n message with\n line breaks', '\n\n ' + log_util_1.DyFM_Log.h_after +
467
- '\n ' + log_util_1.DyFM_Log.h_after +
468
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n');
469
- });
470
- it('| should handle line breaks in highlighted info message', () => {
471
- log_util_1.DyFM_Log.highlightedInfo('Highlighted info\nmessage with\nline breaks');
472
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle +
473
- '\n\n' + log_util_1.DyFM_Log.h_before +
474
- '\n ' + log_util_1.DyFM_Log.h_before +
475
- '\n ' + log_util_1.DyFM_Log.h_before +
476
- '\n\n Highlighted info\n message with\n line breaks', '\n\n ' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_after +
477
- '\n ' + log_util_1.DyFM_Log.h_after +
478
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
479
- });
480
- it('| should handle line breaks in highlighted error message', () => {
481
- log_util_1.DyFM_Log.highlightedError('Highlighted error\nmessage with\nline breaks');
482
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle +
483
- '\n\n' + log_util_1.DyFM_Log.h_before +
484
- '\n ' + log_util_1.DyFM_Log.h_before +
485
- '\n ' + log_util_1.DyFM_Log.h_before +
486
- '\n\n Highlighted error\n message with\n line breaks', '\n\n ' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_after +
487
- '\n ' + log_util_1.DyFM_Log.h_after +
488
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
489
- });
490
- it('| should handle line breaks in highlighted warning message', () => {
491
- log_util_1.DyFM_Log.highlightedWarn('Highlighted warning\nmessage with\nline breaks');
492
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle +
493
- '\n\n' + log_util_1.DyFM_Log.h_before +
494
- '\n ' + log_util_1.DyFM_Log.h_before +
495
- '\n ' + log_util_1.DyFM_Log.h_before +
496
- '\n\n Highlighted warning\n message with\n line breaks', '\n\n ' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_after +
497
- '\n ' + log_util_1.DyFM_Log.h_after +
498
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
499
- });
500
- it('| should handle line breaks in highlighted success message', () => {
501
- log_util_1.DyFM_Log.highlightedSuccess('Highlighted success\nmessage with\nline breaks');
502
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle +
503
- '\n\n' + log_util_1.DyFM_Log.h_before +
504
- '\n ' + log_util_1.DyFM_Log.h_before +
505
- '\n ' + log_util_1.DyFM_Log.h_before +
506
- '\n\n Highlighted success\n message with\n line breaks', '\n\n ' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_after +
507
- '\n ' + log_util_1.DyFM_Log.h_after +
508
- '\n' + log_util_1.DyFM_Log.h_after + '\n\n', log_style_enum_1.DyFM_LogStyle.reset);
509
- });
510
- it('| should handle line breaks in optional parameters', () => {
511
- log_util_1.DyFM_Log.testLog('Test message', 'param1\nparam2', 'param3\nparam4');
512
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
513
- '\n\n Test message', 'param1\n param2', 'param3\n param4', '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
514
- });
515
- it('| should handle mixed content in optional parameters', () => {
516
- log_util_1.DyFM_Log.testLog('Test message', 'param1\nparam2', 123, { key: 'value\nwith\nbreaks' });
517
- expect(console.log).toHaveBeenCalledWith('\n' + log_util_1.DyFM_Log.h_test +
518
- '\n\n Test message', 'param1\n param2', 123, { key: 'value\nwith\nbreaks' }, '\n\n' + log_util_1.DyFM_Log.h_test + '\n');
519
- });
520
- });
521
- describe('| Small log alias metódusok', () => {
522
- it('| should call smallLog method via S_log alias', () => {
523
- log_util_1.DyFM_Log.S_log('Small log message');
524
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
525
- '\n Small log message', '\n' + log_util_1.DyFM_Log.h_small);
526
- });
527
- it('| should call smallInfo method via S_info alias', () => {
528
- log_util_1.DyFM_Log.S_info('Small info message');
529
- expect(console.info).toHaveBeenCalledWith(log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_small +
530
- '\n Small info message', '\n' + log_util_1.DyFM_Log.infoStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
531
- });
532
- it('| should call smallError method via S_error alias', () => {
533
- log_util_1.DyFM_Log.S_error('Small error message');
534
- expect(console.error).toHaveBeenCalledWith(log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small +
535
- '\n Small error message', '\n' + log_util_1.DyFM_Log.errorStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
536
- });
537
- it('| should call smallWarn method via S_warn alias', () => {
538
- log_util_1.DyFM_Log.S_warn('Small warning message');
539
- expect(console.warn).toHaveBeenCalledWith(log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small +
540
- '\n Small warning message', '\n' + log_util_1.DyFM_Log.warnStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
541
- });
542
- it('| should call smallSuccess method via S_success alias', () => {
543
- log_util_1.DyFM_Log.S_success('Small success message');
544
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small +
545
- '\n Small success message', '\n' + log_util_1.DyFM_Log.successStyle + log_util_1.DyFM_Log.h_small, log_style_enum_1.DyFM_LogStyle.reset);
546
- });
547
- });
548
- describe('| Line break edge cases', () => {
549
- it('| should handle empty string with line breaks', () => {
550
- log_util_1.DyFM_Log.smallLog('');
551
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
552
- '\n ', '\n' + log_util_1.DyFM_Log.h_small);
553
- });
554
- it('| should handle string with only line breaks', () => {
555
- log_util_1.DyFM_Log.smallLog('\n\n');
556
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
557
- '\n \n \n ', '\n' + log_util_1.DyFM_Log.h_small);
558
- });
559
- it('| should handle string with leading and trailing line breaks', () => {
560
- log_util_1.DyFM_Log.smallLog('\nMessage\n');
561
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
562
- '\n \n Message\n ', '\n' + log_util_1.DyFM_Log.h_small);
563
- });
564
- it('| should handle multiple consecutive line breaks', () => {
565
- log_util_1.DyFM_Log.smallLog('Message\n\n\nwith\n\n\nbreaks');
566
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
567
- '\n Message\n \n \n with\n \n \n breaks', '\n' + log_util_1.DyFM_Log.h_small);
568
- });
569
- it('| should handle line breaks in complex objects', () => {
570
- const complexObj = {
571
- message: 'Complex\nobject\nwith\nbreaks',
572
- nested: {
573
- value: 'Nested\nvalue\nwith\nbreaks'
574
- }
575
- };
576
- log_util_1.DyFM_Log.smallLog('Test message', complexObj);
577
- expect(console.log).toHaveBeenCalledWith(log_util_1.DyFM_Log.h_small +
578
- '\n Test message', complexObj, '\n' + log_util_1.DyFM_Log.h_small);
579
- });
580
- });
581
- describe('| Edge cases és hibakezelés', () => {
582
- it('| should handle empty string in addStyle', () => {
583
- const result = log_util_1.DyFM_Log.addStyle('', [log_style_enum_1.DyFM_LogStyle.green]);
584
- expect(result).toBe(log_style_enum_1.DyFM_LogStyle.green + log_style_enum_1.DyFM_LogStyle.reset);
585
- });
586
- it('| should handle empty string in getHighlighted', () => {
587
- const result = log_util_1.DyFM_Log.getHighlighted('');
588
- expect(result).toBe(log_util_1.DyFM_Log.highlightedStyle + log_style_enum_1.DyFM_LogStyle.reset);
589
- });
590
- it('| should handle null and undefined in addBreaksAndTabsToStringParams', () => {
591
- const params = [null, undefined, 'string', 123];
592
- const result = log_util_1.DyFM_Log.addBreaksAndTabsToStringParams(params);
593
- expect(result).toEqual([null, undefined, '\n string', 123]);
594
- });
595
- it('| should handle complex objects in addBreaksAndTabsToStringParams', () => {
596
- const params = ['string', { key: 'value' }, [1, 2, 3]];
597
- const result = log_util_1.DyFM_Log.addBreaksAndTabsToStringParams(params);
598
- expect(result).toEqual(['\n string', { key: 'value' }, [1, 2, 3]]);
599
- });
600
- });
601
- describe('| Debug actual output', () => {
602
- it('| should capture actual output format', () => {
603
- // This test captures the actual output format to understand what the implementation produces
604
- const originalLog = console.log;
605
- const originalError = console.error;
606
- const originalWarn = console.warn;
607
- const originalInfo = console.info;
608
- const outputs = [];
609
- console.log = (...args) => {
610
- outputs.push({ type: 'log', args: args.map(arg => typeof arg === 'string' ? JSON.stringify(arg) : arg) });
611
- };
612
- console.error = (...args) => {
613
- outputs.push({ type: 'error', args: args.map(arg => typeof arg === 'string' ? JSON.stringify(arg) : arg) });
614
- };
615
- console.warn = (...args) => {
616
- outputs.push({ type: 'warn', args: args.map(arg => typeof arg === 'string' ? JSON.stringify(arg) : arg) });
617
- };
618
- console.info = (...args) => {
619
- outputs.push({ type: 'info', args: args.map(arg => typeof arg === 'string' ? JSON.stringify(arg) : arg) });
620
- };
621
- log_util_1.DyFM_Log.testLog('Test message');
622
- log_util_1.DyFM_Log.smallLog('Small message');
623
- log_util_1.DyFM_Log.highlightedLog('Highlighted message');
624
- console.log = originalLog;
625
- console.error = originalError;
626
- console.warn = originalWarn;
627
- console.info = originalInfo;
628
- console.log('Actual outputs:', JSON.stringify(outputs, null, 2));
629
- expect(true).toBe(true); // This test always passes
630
- });
631
- });
632
- });
633
- //# sourceMappingURL=log.util.spec.js.map