testeranto 0.197.0 → 0.199.0

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 (301) hide show
  1. package/.vscode/settings.json +7 -2
  2. package/design-editor/DesignEditor.tsx +9 -5
  3. package/dist/common/design-editor/DesignEditor.js +8 -5
  4. package/dist/common/src/App.js +29 -5
  5. package/dist/common/src/Node.js +3 -2
  6. package/dist/common/src/PM/main.js +1 -1
  7. package/dist/common/src/Pure.js +2 -2
  8. package/dist/common/src/Web.js +2 -2
  9. package/dist/common/src/components/DesignEditorPage.js +55 -19
  10. package/dist/common/src/lib/BaseGiven.js +99 -0
  11. package/dist/common/src/lib/BaseSuite.test/mock.js +9 -5
  12. package/dist/common/src/lib/BaseThen.js +64 -0
  13. package/dist/common/src/lib/BaseWhen.js +45 -0
  14. package/dist/common/src/lib/Tiposkripto.js +149 -0
  15. package/dist/common/src/lib/{core.test/MockCore.js → Tiposkripto.test/MockTiposkripto.js} +5 -8
  16. package/dist/common/src/lib/{core.test/core.test.adapter.js → Tiposkripto.test/Tiposkripto.adapter.js} +10 -8
  17. package/dist/common/src/lib/{classBuilder.test/classBuilder.test.implementation.js → Tiposkripto.test/Tiposkripto.implementation.js} +44 -61
  18. package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.js +11 -0
  19. package/dist/common/src/lib/{classBuilder.test/classBuilder.test.specification.js → Tiposkripto.test/Tiposkripto.specification.js} +13 -9
  20. package/dist/common/src/lib/abstractBase.test/MockGiven.js +10 -3
  21. package/dist/common/src/lib/abstractBase.test/MockThen.js +6 -3
  22. package/dist/common/src/lib/abstractBase.test/MockWhen.js +10 -3
  23. package/dist/common/src/lib/abstractBase.test/adapter.js +18 -6
  24. package/dist/common/src/lib/abstractBase.test/implementation.js +3 -3
  25. package/dist/common/src/lib/mocks.test.js +10 -8
  26. package/dist/common/src/run.js +15 -4
  27. package/dist/common/testeranto.config.js +12 -36
  28. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  29. package/dist/module/design-editor/DesignEditor.js +8 -5
  30. package/dist/module/src/App.js +29 -5
  31. package/dist/module/src/Node.js +3 -2
  32. package/dist/module/src/PM/main.js +1 -1
  33. package/dist/module/src/Pure.js +2 -2
  34. package/dist/module/src/Web.js +2 -2
  35. package/dist/module/src/components/DesignEditorPage.js +55 -19
  36. package/dist/module/src/lib/BaseGiven.js +95 -0
  37. package/dist/module/src/lib/BaseSuite.test/mock.js +6 -2
  38. package/dist/module/src/lib/BaseThen.js +60 -0
  39. package/dist/module/src/lib/BaseWhen.js +41 -0
  40. package/dist/module/src/lib/Tiposkripto.js +146 -0
  41. package/dist/module/src/lib/{core.test/MockCore.js → Tiposkripto.test/MockTiposkripto.js} +3 -6
  42. package/dist/module/src/lib/{core.test/core.test.adapter.js → Tiposkripto.test/Tiposkripto.adapter.js} +10 -8
  43. package/dist/module/src/lib/{classBuilder.test/classBuilder.test.implementation.js → Tiposkripto.test/Tiposkripto.implementation.js} +44 -58
  44. package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.js +6 -0
  45. package/dist/module/src/lib/{classBuilder.test/classBuilder.test.specification.js → Tiposkripto.test/Tiposkripto.specification.js} +12 -8
  46. package/dist/module/src/lib/abstractBase.test/MockGiven.js +9 -2
  47. package/dist/module/src/lib/abstractBase.test/MockThen.js +5 -2
  48. package/dist/module/src/lib/abstractBase.test/MockWhen.js +9 -2
  49. package/dist/module/src/lib/abstractBase.test/adapter.js +18 -6
  50. package/dist/module/src/lib/abstractBase.test/implementation.js +3 -3
  51. package/dist/module/src/lib/mocks.test.js +11 -5
  52. package/dist/module/src/run.js +15 -4
  53. package/dist/module/testeranto.config.js +12 -36
  54. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  55. package/dist/prebuild/App.js +1461 -8949
  56. package/dist/prebuild/run.mjs +25 -14
  57. package/dist/tsconfig.tsbuildinfo +1 -0
  58. package/dist/types/src/Node.d.ts +2 -2
  59. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +1 -15
  60. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +1 -15
  61. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +1 -15
  62. package/dist/types/src/Pure.d.ts +2 -2
  63. package/dist/types/src/Pure.test.d.ts +1 -58
  64. package/dist/types/src/ReportServer.test.ts/index.d.ts +1 -28
  65. package/dist/types/src/Types.d.ts +3 -1
  66. package/dist/types/src/Web.d.ts +2 -2
  67. package/dist/types/src/components/pure/AppFrame.test/index.d.ts +1 -3
  68. package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +1 -1
  69. package/dist/types/src/components/pure/ModalContent.test/index.d.ts +1 -2
  70. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +1 -1
  71. package/dist/types/src/components/pure/TestPageView.test/index.d.ts +1 -1
  72. package/dist/types/src/lib/BaseGiven.d.ts +44 -0
  73. package/dist/types/src/lib/BaseSuite.d.ts +12 -7
  74. package/dist/types/src/lib/BaseSuite.test/mock.d.ts +3 -1
  75. package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +1 -2
  76. package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +1 -2
  77. package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +1 -2
  78. package/dist/types/src/lib/BaseThen.d.ts +27 -0
  79. package/dist/types/src/lib/BaseWhen.d.ts +27 -0
  80. package/dist/types/src/lib/Tiposkripto.d.ts +35 -0
  81. package/dist/types/src/lib/{core.test/MockCore.d.ts → Tiposkripto.test/MockTiposkripto.d.ts} +3 -3
  82. package/dist/types/src/lib/{core.test/core.test.adapter.d.ts → Tiposkripto.test/Tiposkripto.adapter.d.ts} +1 -1
  83. package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.d.ts +2 -0
  84. package/dist/types/src/lib/{core.test/core.test.implementation.d.ts → Tiposkripto.test/Tiposkripto.implementation.d.ts} +1 -1
  85. package/dist/types/src/lib/{core.test/core.test.specification.d.ts → Tiposkripto.test/Tiposkripto.specification.d.ts} +1 -1
  86. package/dist/types/src/lib/{classBuilder.test/classBuilder.test.types.d.ts → Tiposkripto.test/Tiposkripto.types.d.ts} +11 -9
  87. package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +3 -1
  88. package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +1 -1
  89. package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +1 -1
  90. package/dist/types/src/lib/abstractBase.test/index.d.ts +1 -2
  91. package/dist/types/src/lib/abstractBase.test/types.d.ts +3 -3
  92. package/dist/types/src/lib/index.d.ts +1 -1
  93. package/dist/types/src/lib/mocks.test.d.ts +0 -2
  94. package/dist/types/src/lib/pmProxy.test/index.d.ts +1 -2
  95. package/dist/types/src/lib/types.d.ts +3 -1
  96. package/dist/types/src/mothership/test.d.ts +1 -18
  97. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  98. package/package.json +14 -14
  99. package/src/App.tsx +27 -5
  100. package/src/Node.ts +3 -2
  101. package/src/PM/main.ts +1 -1
  102. package/src/Pure.ts +3 -2
  103. package/src/Types.ts +5 -3
  104. package/src/Web.ts +2 -2
  105. package/src/components/DesignEditorPage.tsx +54 -21
  106. package/src/lib/BaseGiven.ts +193 -0
  107. package/src/lib/BaseSuite.test/mock.ts +9 -2
  108. package/src/lib/BaseSuite.ts +14 -1
  109. package/src/lib/BaseThen.ts +108 -0
  110. package/src/lib/BaseWhen.ts +91 -0
  111. package/src/lib/{core.test/MockCore.ts → Tiposkripto.test/MockTiposkripto.ts} +4 -7
  112. package/src/lib/{core.test/core.test.adapter.ts → Tiposkripto.test/Tiposkripto.adapter.ts} +12 -11
  113. package/src/lib/{classBuilder.test/classBuilder.test.implementation.ts → Tiposkripto.test/Tiposkripto.implementation.ts} +75 -78
  114. package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +109 -0
  115. package/src/lib/Tiposkripto.test/Tiposkripto.ts +15 -0
  116. package/src/lib/{classBuilder.test/classBuilder.test.types.ts → Tiposkripto.test/Tiposkripto.types.ts} +12 -9
  117. package/src/lib/Tiposkripto.ts +325 -0
  118. package/src/lib/abstractBase.test/MockGiven.ts +12 -2
  119. package/src/lib/abstractBase.test/MockThen.ts +7 -2
  120. package/src/lib/abstractBase.test/MockWhen.ts +10 -2
  121. package/src/lib/abstractBase.test/adapter.ts +20 -6
  122. package/src/lib/abstractBase.test/implementation.ts +6 -6
  123. package/src/lib/abstractBase.test/types.ts +3 -3
  124. package/src/lib/index.ts +9 -3
  125. package/src/lib/mocks.test.ts +10 -9
  126. package/src/lib/types.ts +3 -1
  127. package/src/run.ts +19 -4
  128. package/testeranto/App.js +1461 -8949
  129. package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +1121 -9
  130. package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +979 -8
  131. package/testeranto/bundles/{pure/core/chunk-62UVCSQC.mjs → web/core/src/lib/BaseSuite.test/web.test.mjs} +721 -431
  132. package/testeranto/metafiles/node/core.json +264 -2180
  133. package/testeranto/metafiles/pure/core.json +147 -288
  134. package/testeranto/metafiles/web/core.json +16949 -18
  135. package/testeranto/reports/core/config.json +8 -40
  136. package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +8 -13
  137. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +66 -2
  138. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +2 -0
  139. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +16 -0
  140. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +68 -0
  141. package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +56 -0
  142. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +22 -3
  143. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +2 -0
  144. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
  145. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +16 -0
  146. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +88 -0
  147. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +45 -0
  148. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/error.log +0 -3
  149. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/info.log +2 -0
  150. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/lint_errors.txt +47 -0
  151. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/prompt.txt +17 -0
  152. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/tests.json +57 -0
  153. package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/type_errors.txt +99 -0
  154. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +1 -0
  155. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +7 -9
  156. package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +11 -16
  157. package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +11 -16
  158. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -2
  159. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +15 -0
  160. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +29 -0
  161. package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +56 -0
  162. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -0
  163. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +17 -0
  164. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +17 -0
  165. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +18 -0
  166. package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +32 -0
  167. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -1
  168. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +60 -82
  169. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +8 -13
  170. package/testeranto/reports/core/summary.json +23 -36
  171. package/testeranto.config.ts +14 -41
  172. package/tsc.log +274 -455
  173. package/dist/common/src/lib/abstractBase.js +0 -196
  174. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +0 -25
  175. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +0 -113
  176. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +0 -46
  177. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.node.js +0 -12
  178. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.pure.js +0 -12
  179. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +0 -18
  180. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.web.js +0 -12
  181. package/dist/common/src/lib/basebuilder.js +0 -88
  182. package/dist/common/src/lib/classBuilder.js +0 -36
  183. package/dist/common/src/lib/classBuilder.test/classBuilder.test.adapter.js +0 -23
  184. package/dist/common/src/lib/classBuilder.test/classBuilder.test.js +0 -12
  185. package/dist/common/src/lib/classBuilder.test/classBuilder.test.types.js +0 -2
  186. package/dist/common/src/lib/classBuilder.test/mock.js +0 -17
  187. package/dist/common/src/lib/core.js +0 -45
  188. package/dist/common/src/lib/core.test/core.test.implementation.js +0 -121
  189. package/dist/common/src/lib/core.test/core.test.js +0 -63
  190. package/dist/common/src/lib/core.test/core.test.specification.js +0 -53
  191. package/dist/common/src/lib/core.test/core.test.types.js +0 -2
  192. package/dist/module/src/lib/abstractBase.js +0 -190
  193. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +0 -22
  194. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +0 -110
  195. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +0 -42
  196. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.node.js +0 -7
  197. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.pure.js +0 -7
  198. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +0 -14
  199. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.web.js +0 -7
  200. package/dist/module/src/lib/basebuilder.js +0 -84
  201. package/dist/module/src/lib/classBuilder.js +0 -32
  202. package/dist/module/src/lib/classBuilder.test/classBuilder.test.adapter.js +0 -20
  203. package/dist/module/src/lib/classBuilder.test/classBuilder.test.js +0 -7
  204. package/dist/module/src/lib/classBuilder.test/classBuilder.test.types.js +0 -1
  205. package/dist/module/src/lib/classBuilder.test/mock.js +0 -14
  206. package/dist/module/src/lib/core.js +0 -42
  207. package/dist/module/src/lib/core.test/core.test.implementation.js +0 -118
  208. package/dist/module/src/lib/core.test/core.test.js +0 -58
  209. package/dist/module/src/lib/core.test/core.test.specification.js +0 -49
  210. package/dist/module/src/lib/core.test/core.test.types.js +0 -1
  211. package/dist/types/src/lib/abstractBase.d.ts +0 -70
  212. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.adapter.d.ts +0 -3
  213. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.implementation.d.ts +0 -3
  214. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.mock.d.ts +0 -15
  215. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.node.d.ts +0 -3
  216. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.pure.d.ts +0 -3
  217. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.specification.d.ts +0 -3
  218. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +0 -22
  219. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.web.d.ts +0 -3
  220. package/dist/types/src/lib/basebuilder.d.ts +0 -23
  221. package/dist/types/src/lib/classBuilder.d.ts +0 -15
  222. package/dist/types/src/lib/classBuilder.test/classBuilder.test.adapter.d.ts +0 -3
  223. package/dist/types/src/lib/classBuilder.test/classBuilder.test.d.ts +0 -3
  224. package/dist/types/src/lib/classBuilder.test/classBuilder.test.implementation.d.ts +0 -3
  225. package/dist/types/src/lib/classBuilder.test/classBuilder.test.specification.d.ts +0 -3
  226. package/dist/types/src/lib/classBuilder.test/mock.d.ts +0 -14
  227. package/dist/types/src/lib/core.d.ts +0 -12
  228. package/dist/types/src/lib/core.test/core.test.d.ts +0 -3
  229. package/dist/types/src/lib/core.test/core.test.types.d.ts +0 -46
  230. package/src/lib/abstractBase.ts +0 -351
  231. package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +0 -29
  232. package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +0 -139
  233. package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +0 -90
  234. package/src/lib/baseBuilder.test/baseBuilder.test.node.ts +0 -16
  235. package/src/lib/baseBuilder.test/baseBuilder.test.pure.ts +0 -16
  236. package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +0 -35
  237. package/src/lib/baseBuilder.test/baseBuilder.test.types.ts +0 -36
  238. package/src/lib/baseBuilder.test/baseBuilder.test.web.ts +0 -16
  239. package/src/lib/basebuilder.ts +0 -187
  240. package/src/lib/classBuilder.test/classBuilder.test.adapter.ts +0 -25
  241. package/src/lib/classBuilder.test/classBuilder.test.specification.ts +0 -104
  242. package/src/lib/classBuilder.test/classBuilder.test.ts +0 -14
  243. package/src/lib/classBuilder.test/mock.ts +0 -83
  244. package/src/lib/classBuilder.ts +0 -120
  245. package/src/lib/core.test/core.test.implementation.ts +0 -155
  246. package/src/lib/core.test/core.test.specification.ts +0 -113
  247. package/src/lib/core.test/core.test.ts +0 -72
  248. package/src/lib/core.test/core.test.types.ts +0 -68
  249. package/src/lib/core.ts +0 -125
  250. package/testeranto/bundles/node/core/chunk-4CSH4UJE.mjs +0 -872
  251. package/testeranto/bundles/node/core/chunk-4JTDLQVA.mjs +0 -253
  252. package/testeranto/bundles/node/core/chunk-C3APFDUV.mjs +0 -70
  253. package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -243
  254. package/testeranto/bundles/node/core/src/lib/classBuilder.test/classBuilder.test.mjs +0 -411
  255. package/testeranto/bundles/node/core/src/lib/core.test/core.test.mjs +0 -494
  256. package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +0 -4755
  257. package/testeranto/bundles/pure/core/src/Pure.test.mjs +0 -410
  258. package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -241
  259. package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +0 -15
  260. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +0 -15
  261. package/testeranto/bundles/web/core/src/components/pure/TestPageView.test/index.html +0 -15
  262. package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -15
  263. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/exit.log +0 -1
  264. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -10
  265. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -17
  266. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/stdout.log +0 -6
  267. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
  268. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-1/butThen/artifact_test.txt +0 -1
  269. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -71
  270. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -42
  271. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -10
  272. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -17
  273. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -42
  274. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/debug.log +0 -0
  275. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/error.log +0 -3
  276. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/exit.log +0 -1
  277. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/info.log +0 -0
  278. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/warn.log +0 -0
  279. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/exit.log +0 -1
  280. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +0 -17
  281. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stderr.log +0 -0
  282. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stdout.log +0 -619
  283. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/tests.json +0 -165
  284. package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +0 -88
  285. package/testeranto/reports/core/src/lib/core.test/core.test/node/exit.log +0 -1
  286. package/testeranto/reports/core/src/lib/core.test/core.test/node/lint_errors.txt +0 -21
  287. package/testeranto/reports/core/src/lib/core.test/core.test/node/prompt.txt +0 -19
  288. package/testeranto/reports/core/src/lib/core.test/core.test/node/stderr.log +0 -0
  289. package/testeranto/reports/core/src/lib/core.test/core.test/node/type_errors.txt +0 -45
  290. package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +0 -152
  291. package/testeranto/reportsweb_build_errors +0 -546
  292. /package/dist/common/src/lib/{baseBuilder.test/baseBuilder.test.types.js → Tiposkripto.test/Tiposkripto.types.js} +0 -0
  293. /package/dist/module/src/lib/{baseBuilder.test/baseBuilder.test.types.js → Tiposkripto.test/Tiposkripto.types.js} +0 -0
  294. /package/testeranto/reports/core/src/{lib/classBuilder.test/classBuilder.test/node → components/pure/FeaturesReporterView.test/index/web}/lint_errors.txt +0 -0
  295. /package/testeranto/reports/core/src/{lib/baseBuilder.test/baseBuilder.test.node/node → components/pure/FeaturesReporterView.test/index/web}/message.txt +0 -0
  296. /package/testeranto/reports/core/src/{lib/baseBuilder.test/baseBuilder.test.pure/pure → components/pure/ProjectPageView.test/index/web}/message.txt +0 -0
  297. /package/testeranto/reports/core/src/{lib/classBuilder.test/classBuilder.test/node → components/pure/TestPageView.test/index/web}/message.txt +0 -0
  298. /package/testeranto/reports/core/src/lib/{baseBuilder.test/baseBuilder.test.node/node/stderr.log → BaseSuite.test/web.test/web/lint_errors.txt} +0 -0
  299. /package/testeranto/reports/core/src/lib/{core.test/core.test/node → BaseSuite.test/web.test/web}/message.txt +0 -0
  300. /package/testeranto/reports/core/src/lib/{baseBuilder.test/baseBuilder.test.pure/pure/exit.log → TipoSkripto.test/TipoSkripto/node/lint_errors.txt} +0 -0
  301. /package/testeranto/reports/core/src/lib/{core.test/core.test → TipoSkripto.test/TipoSkripto}/node/stdout.log +0 -0
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /* eslint-disable @typescript-eslint/no-unused-vars */
3
- /* eslint-disable @typescript-eslint/no-explicit-any */
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const index_js_1 = require("./index.js");
6
- const abstractBase_js_1 = require("./abstractBase.js");
7
- const classBuilder_js_1 = require("./classBuilder.js");
8
- const BaseSuite_js_1 = require("./BaseSuite.js");
9
- class TesterantoCore extends classBuilder_js_1.ClassBuilder {
10
- constructor(input, testSpecification, testImplementation, testResourceRequirement = index_js_1.defaultTestResourceRequirement, testAdapter, uberCatcher) {
11
- const fullAdapter = (0, index_js_1.DefaultAdapter)(testAdapter);
12
- super(testImplementation, testSpecification, input, class extends BaseSuite_js_1.BaseSuite {
13
- afterAll(store, artifactory, pm) {
14
- return fullAdapter.afterAll(store, pm);
15
- }
16
- assertThat(t) {
17
- return fullAdapter.assertThis(t);
18
- }
19
- async setup(s, artifactory, tr, pm) {
20
- var _a, _b;
21
- return (_b = (_a = fullAdapter.beforeAll) === null || _a === void 0 ? void 0 : _a.call(fullAdapter, s, tr, pm)) !== null && _b !== void 0 ? _b : s;
22
- }
23
- }, class Given extends abstractBase_js_1.BaseGiven {
24
- constructor() {
25
- super(...arguments);
26
- this.uberCatcher = uberCatcher;
27
- }
28
- async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
29
- return fullAdapter.beforeEach(subject, initializer, testResource, initialValues, pm);
30
- }
31
- afterEach(store, key, artifactory, pm) {
32
- return Promise.resolve(fullAdapter.afterEach(store, key, pm));
33
- }
34
- }, class When extends abstractBase_js_1.BaseWhen {
35
- async andWhen(store, whenCB, testResource, pm) {
36
- return await fullAdapter.andWhen(store, whenCB, testResource, pm);
37
- }
38
- }, class Then extends abstractBase_js_1.BaseThen {
39
- async butThen(store, thenCB, testResource, pm) {
40
- return await fullAdapter.butThen(store, thenCB, testResource, pm);
41
- }
42
- }, testResourceRequirement);
43
- }
44
- }
45
- exports.default = TesterantoCore;
@@ -1,121 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.implementation = void 0;
4
- const MockCore_1 = require("./MockCore");
5
- exports.implementation = {
6
- suites: {
7
- Default: "Testeranto test suite",
8
- ExtendedSuite: "Extended Testeranto test suite",
9
- },
10
- givens: {
11
- Default: () => {
12
- const input = { debug: true };
13
- const resourceReq = { ports: [3000] };
14
- try {
15
- const instance = new MockCore_1.MockCore(input, specification, exports.implementation, resourceReq, testAdapter, (cb) => cb());
16
- return instance;
17
- }
18
- catch (e) {
19
- console.error("[ERROR] Failed to create MockCore:", e);
20
- throw e;
21
- }
22
- },
23
- WithCustomInput: (input) => {
24
- return new MockCore_1.MockCore(input, specification, exports.implementation, { ports: [] }, testAdapter, (cb) => cb());
25
- },
26
- WithResourceRequirements: (requirements) => {
27
- return new MockCore_1.MockCore({}, specification, exports.implementation, requirements, testAdapter, (cb) => cb());
28
- },
29
- WithCustomAdapter: (customAdapter) => {
30
- return new MockCore_1.MockCore({}, specification, exports.implementation, { ports: [] }, Object.assign(Object.assign({}, testAdapter), customAdapter), (cb) => cb());
31
- },
32
- },
33
- whens: {
34
- addArtifact: (artifact) => (builder) => {
35
- builder.artifacts.push(artifact);
36
- return builder;
37
- },
38
- setTestJobs: (jobs) => (builder) => {
39
- builder.testJobs = jobs;
40
- return builder;
41
- },
42
- modifySpecs: (modifier) => (builder) => {
43
- var _a;
44
- console.log("Modifying specs - current count:", (_a = builder.specs) === null || _a === void 0 ? void 0 : _a.length);
45
- const newSpecs = modifier(builder.specs || []);
46
- console.log("Modifying specs - new count:", newSpecs.length);
47
- builder.specs = newSpecs;
48
- return builder;
49
- },
50
- triggerError: (message) => (builder) => {
51
- throw new Error(message);
52
- },
53
- },
54
- thens: {
55
- initializedProperly: () => (builder) => {
56
- if (!builder) {
57
- throw new Error("Builder is undefined");
58
- }
59
- if (!(builder instanceof MockCore_1.MockCore)) {
60
- throw new Error(`Builder is not MockCore (got ${builder.constructor.name})`);
61
- }
62
- if (!builder.testResourceRequirement) {
63
- throw new Error("testResourceRequirement not set");
64
- }
65
- if (!builder.testAdapter) {
66
- throw new Error("testAdapter not set");
67
- }
68
- return builder;
69
- },
70
- specsGenerated: () => (builder) => {
71
- if (!Array.isArray(builder.specs)) {
72
- throw new Error("Specs were not generated");
73
- }
74
- return builder;
75
- },
76
- jobsCreated: () => (builder) => {
77
- if (!Array.isArray(builder.testJobs)) {
78
- throw new Error("Test jobs were not created");
79
- }
80
- return builder;
81
- },
82
- artifactsTracked: () => (builder) => {
83
- if (!Array.isArray(builder.artifacts)) {
84
- throw new Error("Artifacts array not initialized");
85
- }
86
- return builder;
87
- },
88
- resourceRequirementsSet: () => (builder) => {
89
- if (!builder.testResourceRequirement) {
90
- throw new Error("Resource requirements not set");
91
- }
92
- return builder;
93
- },
94
- interfaceConfigured: () => (builder) => {
95
- if (!builder.testAdapter) {
96
- throw new Error("Test adapter not configured");
97
- }
98
- return builder;
99
- },
100
- errorThrown: (expectedMessage) => (builder) => {
101
- // Handled by test runner
102
- return builder;
103
- },
104
- testRunSuccessful: () => async (builder) => {
105
- try {
106
- await builder.receiveTestResourceConfig("");
107
- return builder;
108
- }
109
- catch (e) {
110
- throw new Error(`Test run failed: ${e.message}`);
111
- }
112
- },
113
- specsModified: (expectedCount) => (builder) => {
114
- var _a;
115
- if (!builder.specs || builder.specs.length !== expectedCount) {
116
- throw new Error(`Expected ${expectedCount} specs, got ${(_a = builder.specs) === null || _a === void 0 ? void 0 : _a.length}`);
117
- }
118
- return builder;
119
- },
120
- },
121
- };
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Pure_1 = __importDefault(require("../../Pure"));
7
- const core_test_specification_1 = require("./core.test.specification");
8
- const core_test_implementation_1 = require("./core.test.implementation");
9
- const core_test_adapter_1 = require("./core.test.adapter");
10
- const MockCore_1 = require("./MockCore");
11
- exports.default = (0, Pure_1.default)(MockCore_1.MockCore.prototype, core_test_specification_1.specification, core_test_implementation_1.implementation, core_test_adapter_1.testAdapter);
12
- // console.log("[DEBUG] Starting core.test.ts");
13
- // console.log("[DEBUG] MockCore:", MockCore?.name);
14
- // console.log("[DEBUG] specification:", specification?.name);
15
- // console.log("[DEBUG] implementation keys:", Object.keys(implementation));
16
- // console.log("[DEBUG] testAdapter keys:", Object.keys(testAdapter));
17
- // console.log("[DEBUG] Starting test runner with:");
18
- // console.log("- Specification:", specification?.name);
19
- // console.log("- Implementation keys:", Object.keys(implementation));
20
- // console.log("- Test adapter keys:", Object.keys(testAdapter));
21
- // console.log("[DEBUG] Creating test runner instance...");
22
- // try {
23
- // const testRunner = new Testeranto<I, O, M>(
24
- // MockCore.prototype,
25
- // specification,
26
- // implementation,
27
- // { ports: [3000, 3001] },
28
- // testAdapter
29
- // );
30
- // console.log("[DEBUG] Starting test execution...");
31
- // const runTests = async () => {
32
- // try {
33
- // const result = await testRunner.receiveTestResourceConfig(
34
- // JSON.stringify({
35
- // name: "core.test",
36
- // fs: "/tmp/core.test",
37
- // ports: [3000, 3001],
38
- // })
39
- // );
40
- // console.log("[DEBUG] Test run completed with:");
41
- // console.log("- Status:", result.failed ? "FAILED" : "PASSED");
42
- // console.log("- Failures:", result.fails);
43
- // console.log("- Features tested:", result.features?.length);
44
- // console.log("- Artifacts:", result.artifacts?.length);
45
- // if (result.failed) {
46
- // throw new Error(`Tests failed with ${result.fails} failures`);
47
- // }
48
- // return result;
49
- // } catch (e) {
50
- // console.error("[ERROR] Test runner failed:", e.message);
51
- // console.error("- Full error:", e);
52
- // process.exit(1);
53
- // }
54
- // };
55
- // // Run tests immediately when imported
56
- // runTests().catch(e => {
57
- // console.error("[ERROR] Test runner failed:", e);
58
- // process.exit(1);
59
- // });
60
- // } catch (e) {
61
- // console.error("[ERROR] Failed to initialize test runner:", e);
62
- // process.exit(1);
63
- // }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.specification = void 0;
4
- const specification = (Suite, Given, When, Then) => {
5
- const summary = {
6
- suites: {
7
- 'Testeranto Core Functionality': {
8
- features: {},
9
- artifacts: []
10
- },
11
- 'Testeranto Advanced Features': {
12
- features: {},
13
- artifacts: []
14
- }
15
- },
16
- features: {},
17
- artifacts: []
18
- };
19
- return [
20
- Suite.Default("Testeranto Core Functionality", summary.suites['Testeranto Core Functionality'], {
21
- // Initialization tests
22
- defaultInitialization: Given.Default(["Should initialize with default values"], [], [
23
- Then.initializedProperly(),
24
- Then.specsGenerated(),
25
- Then.jobsCreated(),
26
- Then.artifactsTracked()
27
- ]),
28
- customInputInitialization: Given.WithCustomInput({ test: "input" }, [], [Then.initializedProperly()]),
29
- // Configuration tests
30
- resourceConfig: Given.WithResourceRequirements({ ports: [3000, 3001] }, [], [Then.resourceRequirementsSet()]),
31
- interfaceConfig: Given.WithCustomAdapter({
32
- assertThis: (x) => !!x,
33
- beforeEach: async (s, i) => i(),
34
- }, [], [Then.interfaceConfigured()]),
35
- // Core operations
36
- specGeneration: Given.Default(["Should generate test specs"], [], [Then.specsGenerated()]),
37
- jobCreation: Given.Default(["Should create test jobs"], [], [Then.jobsCreated()]),
38
- artifactHandling: Given.Default(["Should track artifacts"], [When.addArtifact(Promise.resolve("test"))], [Then.artifactsTracked()]),
39
- }, []),
40
- Suite.ExtendedSuite("Testeranto Advanced Features", summary.suites['Testeranto Advanced Features'], {
41
- // Error handling
42
- errorPropagation: Given.Default(["Should propagate errors properly"], [When.triggerError("test error")], [Then.errorThrown("test error")]),
43
- // Dynamic behavior
44
- specModification: Given.Default(["Should allow spec modification"], [When.modifySpecs((specs) => [...specs, { name: "extra" }])], [Then.specsModified(1)]),
45
- // Full lifecycle
46
- testExecution: Given.Default(["Should execute full test lifecycle"], [], [Then.testRunSuccessful()]),
47
- // Custom implementations
48
- // Removed customImpl test since WithCustomImplementation isn't defined
49
- dynamicSpecs: Given.Default(["Should handle dynamic spec changes"], [When.modifySpecs((specs) => specs)], [Then.specsGenerated()]),
50
- }),
51
- ];
52
- };
53
- exports.specification = specification;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,190 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- import { afterEachProxy, andWhenProxy, beforeEachProxy, butThenProxy, } from "./pmProxy.js";
4
- export class BaseGiven {
5
- addArtifact(path) {
6
- const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
7
- this.artifacts.push(normalizedPath);
8
- }
9
- constructor(name, features, whens, thens, givenCB, initialValues) {
10
- this.artifacts = [];
11
- this.name = name;
12
- this.features = features;
13
- this.whens = whens;
14
- this.thens = thens;
15
- this.givenCB = givenCB;
16
- this.initialValues = initialValues;
17
- }
18
- beforeAll(store) {
19
- return store;
20
- }
21
- toObj() {
22
- return {
23
- key: this.key,
24
- name: this.name,
25
- whens: this.whens.map((w) => {
26
- if (w && w.toObj)
27
- return w.toObj();
28
- console.error("w is not as expected!", JSON.stringify(w));
29
- return {};
30
- }),
31
- thens: this.thens.map((t) => t.toObj()),
32
- error: this.error ? [this.error, this.error.stack] : null,
33
- failed: this.failed,
34
- features: this.features,
35
- artifacts: this.artifacts,
36
- };
37
- }
38
- async afterEach(store, key, artifactory, pm) {
39
- return store;
40
- }
41
- async give(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm, suiteNdx) {
42
- this.key = key;
43
- tLog(`\n ${this.key}`);
44
- tLog(`\n Given: ${this.name}`);
45
- const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
46
- this.uberCatcher((e) => {
47
- console.error(e.toString());
48
- this.error = e.error;
49
- tLog(e.stack);
50
- });
51
- try {
52
- // Ensure addArtifact is properly bound to 'this'
53
- const addArtifact = this.addArtifact.bind(this);
54
- const proxiedPm = beforeEachProxy(pm, suiteNdx.toString(), addArtifact);
55
- this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, proxiedPm);
56
- }
57
- catch (e) {
58
- // console.error("Given failure: ", e.stack);
59
- this.failed = true;
60
- this.error = e.stack;
61
- // throw e;
62
- }
63
- try {
64
- // tLog(`\n Given this.store`, this.store);
65
- for (const [whenNdx, whenStep] of this.whens.entries()) {
66
- await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
67
- }
68
- for (const [thenNdx, thenStep] of this.thens.entries()) {
69
- const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
70
- tester(t);
71
- }
72
- }
73
- catch (e) {
74
- this.error = e.stack;
75
- this.failed = true;
76
- // tLog(e.stack);
77
- // throw e;
78
- }
79
- finally {
80
- try {
81
- // Ensure addArtifact is properly bound to 'this'
82
- const addArtifact = this.addArtifact.bind(this);
83
- const proxiedPm = afterEachProxy(pm, suiteNdx.toString(), key, addArtifact);
84
- // (proxiedPm as any).currentStep = this;
85
- await this.afterEach(this.store, this.key, givenArtifactory, proxiedPm);
86
- }
87
- catch (e) {
88
- this.failed = e;
89
- throw e;
90
- // this.error = e.message;
91
- }
92
- }
93
- return this.store;
94
- }
95
- }
96
- export class BaseWhen {
97
- addArtifact(path) {
98
- const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
99
- this.artifacts.push(normalizedPath);
100
- }
101
- constructor(name, whenCB) {
102
- this.artifacts = [];
103
- this.name = name;
104
- this.whenCB = whenCB;
105
- }
106
- toObj() {
107
- const obj = {
108
- name: this.name,
109
- error: this.error
110
- ? `${this.error.name}: ${this.error.message}\n${this.error.stack}`
111
- : null,
112
- artifacts: this.artifacts || [],
113
- };
114
- console.log(`[TOOBJ] Serializing ${this.constructor.name} with artifacts:`, obj.artifacts);
115
- return obj;
116
- }
117
- async test(store, testResourceConfiguration, tLog, pm, filepath) {
118
- try {
119
- // tLog(" When:", this.name);
120
- // Ensure addArtifact is properly bound to 'this'
121
- const addArtifact = this.addArtifact.bind(this);
122
- const proxiedPm = andWhenProxy(pm, filepath, addArtifact);
123
- // (proxiedPm as any).currentStep = this;
124
- const result = await this.andWhen(store, this.whenCB, testResourceConfiguration, proxiedPm);
125
- return result;
126
- }
127
- catch (e) {
128
- console.error("[ERROR] When step failed:", this.name.toString(), e.toString());
129
- this.error = e;
130
- throw e;
131
- }
132
- }
133
- }
134
- export class BaseThen {
135
- constructor(name, thenCB) {
136
- this.artifacts = [];
137
- this.name = name;
138
- this.thenCB = thenCB;
139
- this.error = false;
140
- this.artifacts = [];
141
- }
142
- addArtifact(path) {
143
- const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
144
- this.artifacts.push(normalizedPath);
145
- }
146
- toObj() {
147
- const obj = {
148
- name: this.name,
149
- error: this.error,
150
- artifacts: this.artifacts,
151
- };
152
- return obj;
153
- }
154
- async test(store, testResourceConfiguration, tLog, pm, filepath) {
155
- // Ensure addArtifact is properly bound to 'this'
156
- const addArtifact = this.addArtifact.bind(this);
157
- const proxiedPm = butThenProxy(pm, filepath, addArtifact);
158
- return this.butThen(store, async (s) => {
159
- try {
160
- if (typeof this.thenCB === "function") {
161
- // Add debug logging to see what's being passed to thenCB
162
- // Check if the thenCB is spreading the arguments incorrectly
163
- // Wrap the proxy to see what's happening when writeFileSync is called
164
- const wrappedPm = new Proxy(proxiedPm, {
165
- get: (target, prop, receiver) => {
166
- if (prop === "writeFileSync") {
167
- return (...args) => {
168
- console.log(`[DEBUG] writeFileSync called with args:`, args);
169
- return target[prop](...args);
170
- };
171
- }
172
- return target[prop];
173
- },
174
- });
175
- const result = await this.thenCB(s, wrappedPm);
176
- return result;
177
- }
178
- else {
179
- return this.thenCB;
180
- }
181
- }
182
- catch (e) {
183
- console.error(e.stack);
184
- }
185
- }, testResourceConfiguration, proxiedPm).catch((e) => {
186
- this.error = e.stack;
187
- // throw e;
188
- });
189
- }
190
- }
@@ -1,22 +0,0 @@
1
- export const testAdapter = {
2
- beforeAll: async (input, testResource, pm) => {
3
- return input;
4
- },
5
- beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
6
- const result = initializer()();
7
- return result;
8
- },
9
- andWhen: async (store, whenCB, testResource, utils) => {
10
- const result = whenCB(store, utils);
11
- return result;
12
- },
13
- butThen: async (store, thenCB, testResource, pm) => {
14
- const result = thenCB(store, pm);
15
- return result;
16
- },
17
- afterEach: async (store, key, pm) => {
18
- return store;
19
- },
20
- afterAll: (store, pm) => { },
21
- assertThis: (x) => x,
22
- };
@@ -1,110 +0,0 @@
1
- import { MockBaseBuilder } from "./baseBuilder.test.mock";
2
- import { BaseBuilder } from "../basebuilder";
3
- export const implementation = {
4
- suites: {
5
- Default: "BaseBuilder test suite",
6
- },
7
- givens: {
8
- "the default BaseBuilder": () => () => {
9
- return new MockBaseBuilder({}, // input
10
- {}, // suitesOverrides
11
- {}, // givenOverrides
12
- {}, // whenOverrides
13
- {}, // thenOverrides
14
- { ports: 0 }, // testResourceRequirement
15
- () => [] // testSpecification
16
- );
17
- },
18
- "a BaseBuilder with TestInput": (input) => () => {
19
- return new MockBaseBuilder(input, {}, {}, {}, {}, { ports: [] }, () => []);
20
- },
21
- "a BaseBuilder with Test Resource Requirements": (requirements) => () => {
22
- return new MockBaseBuilder({}, {}, {}, {}, {}, requirements, () => []);
23
- },
24
- },
25
- whens: {
26
- addArtifact: (artifact) => (builder, utils) => {
27
- builder.artifacts.push(artifact);
28
- return builder;
29
- },
30
- setTestJobs: (jobs) => (builder, utils) => {
31
- builder.testJobs = jobs;
32
- return builder;
33
- },
34
- },
35
- thens: {
36
- "it is initialized": () => (builder, utils) => {
37
- var _a;
38
- utils.writeFileSync("hello.txt", "world");
39
- if (!(builder instanceof BaseBuilder)) {
40
- console.error("Builder instance:", builder);
41
- throw new Error(`Builder was not properly initialized - expected BaseBuilder instance but got ${(_a = builder === null || builder === void 0 ? void 0 : builder.constructor) === null || _a === void 0 ? void 0 : _a.name}`);
42
- }
43
- // Verify required properties exist
44
- [
45
- "artifacts",
46
- "testJobs",
47
- "specs",
48
- "suitesOverrides",
49
- "givenOverides",
50
- "whenOverides",
51
- "thenOverides",
52
- ].forEach((prop) => {
53
- if (!(prop in builder)) {
54
- throw new Error(`Builder missing required property: ${prop}`);
55
- }
56
- });
57
- return builder;
58
- },
59
- "it generates TestSpecifications": () => (builder, utils) => {
60
- if (!Array.isArray(builder.specs)) {
61
- throw new Error("Specs were not generated");
62
- }
63
- return builder;
64
- },
65
- "it creates jobs": () => (builder, utils) => {
66
- if (!Array.isArray(builder.testJobs)) {
67
- throw new Error("Test jobs were not created");
68
- }
69
- return builder;
70
- },
71
- "it tracks artifacts": () => (builder, utils) => {
72
- if (!Array.isArray(builder.artifacts)) {
73
- throw new Error("Artifacts array not initialized");
74
- }
75
- // Verify we can write artifacts
76
- utils.writeFileSync("artifact_test.txt", "test");
77
- return builder;
78
- },
79
- resourceRequirementsSet: () => (builder, utils) => {
80
- if (!builder.testResourceRequirement) {
81
- throw new Error("Resource requirements not set");
82
- }
83
- return builder;
84
- },
85
- suitesOverridesConfigured: () => (builder, utils) => {
86
- if (!builder.suitesOverrides) {
87
- throw new Error("Suites overrides not configured");
88
- }
89
- return builder;
90
- },
91
- givensOverridesConfigured: () => (builder, utils) => {
92
- if (!builder.givenOverides) {
93
- throw new Error("Givens overrides not configured");
94
- }
95
- return builder;
96
- },
97
- whensOverridesConfigured: () => (builder, utils) => {
98
- if (!builder.whenOverides) {
99
- throw new Error("Whens overrides not configured");
100
- }
101
- return builder;
102
- },
103
- thensOverridesConfigured: () => (builder, utils) => {
104
- if (!builder.thenOverides) {
105
- throw new Error("Thens overrides not configured");
106
- }
107
- return builder;
108
- },
109
- },
110
- };
@@ -1,42 +0,0 @@
1
- import { BaseBuilder } from "../basebuilder";
2
- /**
3
- * Concrete implementation of BaseBuilder for testing purposes only
4
- */
5
- export class MockBaseBuilder extends BaseBuilder {
6
- constructor(input, suitesOverrides = {}, givenOverrides = {}, whenOverrides = {}, thenOverrides = {}, testResourceRequirement = { ports: 0 }, testSpecification = () => []) {
7
- super(input, suitesOverrides, givenOverrides, whenOverrides, thenOverrides, testResourceRequirement, testSpecification);
8
- this.summary = {};
9
- }
10
- /**
11
- * Simplified version for testing that doesn't actually run tests
12
- */
13
- async testRun(puppetMaster) {
14
- try {
15
- this.summary = {
16
- [puppetMaster.testResourceConfiguration.name]: {
17
- typeErrors: 0,
18
- staticErrors: 0,
19
- runTimeError: "",
20
- prompt: "",
21
- failingFeatures: {},
22
- },
23
- };
24
- return {
25
- failed: false,
26
- fails: 0,
27
- artifacts: this.artifacts,
28
- features: [],
29
- };
30
- }
31
- catch (error) {
32
- console.error("Test run failed:", error);
33
- return {
34
- failed: true,
35
- fails: 1,
36
- artifacts: this.artifacts,
37
- features: [],
38
- error: error.message
39
- };
40
- }
41
- }
42
- }
@@ -1,7 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-object-type */
2
- import Testeranto from "../../Node";
3
- import { specification } from "./baseBuilder.test.specification";
4
- import { implementation } from "./baseBuilder.test.implementation";
5
- import { testAdapter } from "./baseBuilder.test.adapter";
6
- import { MockBaseBuilder } from "./baseBuilder.test.mock";
7
- export default Testeranto(MockBaseBuilder.prototype, specification, implementation, testAdapter);
@@ -1,7 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-object-type */
2
- import Testeranto from "../../Pure";
3
- import { specification } from "./baseBuilder.test.specification";
4
- import { implementation } from "./baseBuilder.test.implementation";
5
- import { testAdapter } from "./baseBuilder.test.adapter";
6
- import { MockBaseBuilder } from "./baseBuilder.test.mock";
7
- export default Testeranto(MockBaseBuilder.prototype, specification, implementation, testAdapter);