testeranto 0.129.0 → 0.135.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 (403) hide show
  1. package/.aider.chat.history.md +137798 -0
  2. package/.aider.input.history +370 -0
  3. package/.aider.tags.cache.v3/{ec/c0/161c249c35be853cc40cf11f9267.val → 62/f5/8af72140d93c58db2f6aa5bf3f1f.val} +0 -0
  4. package/.aider.tags.cache.v3/8e/ec/2d4659a1589a0187a757ab1cbefa.val +0 -0
  5. package/.aider.tags.cache.v3/{b7/e6/5be87b62aeaf2bc244ff41c1b61a.val → a7/97/6d37fce350ad2d588f36729db0cd.val} +0 -0
  6. package/.aider.tags.cache.v3/{e3/e6/3501625caf5d5eb171f0d248462e.val → ad/3c/10f2ab1397f6d544e613d2a6acaf.val} +0 -0
  7. package/.aider.tags.cache.v3/cache.db +0 -0
  8. package/.aider.tags.cache.v3/d8/b0/a8966fcd65890fd9f70d7afe8141.val +0 -0
  9. package/.aider.tags.cache.v3/dd/5b/0ade824b0841c7c11e9352c5d2ca.val +0 -0
  10. package/README.md +194 -182
  11. package/bundle.js +8 -75
  12. package/dist/common/src/Init.js +6 -1
  13. package/dist/common/src/Node.js +6 -4
  14. package/dist/common/src/NodeSidecar.js +15 -0
  15. package/dist/common/src/PM/PM_WithEslintAndTsc.js +189 -0
  16. package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +109 -0
  17. package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +94 -0
  18. package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +94 -0
  19. package/dist/common/src/PM/base.js +33 -16
  20. package/dist/common/src/PM/main.js +492 -428
  21. package/dist/common/src/PM/node.js +54 -22
  22. package/dist/common/src/PM/nodeSidecar.js +65 -0
  23. package/dist/common/src/PM/pure.js +55 -47
  24. package/dist/common/src/PM/pureSidecar.js +48 -0
  25. package/dist/common/src/PM/sidecar.js +11 -0
  26. package/dist/common/src/PM/web.js +24 -6
  27. package/dist/common/src/PM/webSidecar.js +47 -0
  28. package/dist/common/src/PureSidecar.js +13 -0
  29. package/dist/common/src/SP__Polygon.test.js +10 -0
  30. package/dist/common/src/WebSidecar.js +14 -0
  31. package/dist/common/src/build.js +66 -12
  32. package/dist/common/src/defaultConfig.js +1 -0
  33. package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +27 -0
  34. package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
  35. package/dist/common/src/esbuildConfigs/node.js +2 -16
  36. package/dist/common/src/esbuildConfigs/pure.js +12 -12
  37. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
  38. package/dist/common/src/esbuildConfigs/web.js +12 -17
  39. package/dist/common/src/lib/Sidecar.js +6 -0
  40. package/dist/common/src/lib/abstractBase.js +13 -6
  41. package/dist/common/src/lib/basebuilder.js +1 -3
  42. package/dist/common/src/lib/classBuilder.js +6 -20
  43. package/dist/common/src/lib/core.js +11 -6
  44. package/dist/common/src/lib/index.js +13 -4
  45. package/dist/common/src/lib/pmProxy.js +1 -1
  46. package/dist/common/src/mothership/index.js +16 -0
  47. package/dist/common/src/mothership/test.js +65 -0
  48. package/dist/common/src/utils/queue.js +36 -0
  49. package/dist/common/src/utils.js +34 -5
  50. package/dist/common/testeranto.config.js +77 -39
  51. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  52. package/dist/module/src/Init.js +6 -1
  53. package/dist/module/src/Node.js +6 -4
  54. package/dist/module/src/NodeSidecar.js +11 -0
  55. package/dist/module/src/PM/PM_WithEslintAndTsc.js +182 -0
  56. package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +104 -0
  57. package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +89 -0
  58. package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +89 -0
  59. package/dist/module/src/PM/base.js +33 -16
  60. package/dist/module/src/PM/main.js +493 -429
  61. package/dist/module/src/PM/node.js +54 -22
  62. package/dist/module/src/PM/nodeSidecar.js +58 -0
  63. package/dist/module/src/PM/pure.js +55 -44
  64. package/dist/module/src/PM/pureSidecar.js +41 -0
  65. package/dist/module/src/PM/sidecar.js +7 -0
  66. package/dist/module/src/PM/web.js +24 -6
  67. package/dist/module/src/PM/webSidecar.js +40 -0
  68. package/dist/module/src/Project.js +154 -75
  69. package/dist/module/src/PureSidecar.js +9 -0
  70. package/dist/module/src/ReportClient.js +132 -97
  71. package/dist/module/src/SP__Polygon.test.js +8 -0
  72. package/dist/module/src/TestReport.js +32 -14
  73. package/dist/module/src/WebSidecar.js +10 -0
  74. package/dist/module/src/build.js +66 -12
  75. package/dist/module/src/defaultConfig.js +1 -0
  76. package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +24 -0
  77. package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
  78. package/dist/module/src/esbuildConfigs/node.js +2 -16
  79. package/dist/module/src/esbuildConfigs/pure.js +12 -12
  80. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
  81. package/dist/module/src/esbuildConfigs/web.js +12 -17
  82. package/dist/module/src/lib/Sidecar.js +2 -0
  83. package/dist/module/src/lib/abstractBase.js +13 -6
  84. package/dist/module/src/lib/basebuilder.js +1 -3
  85. package/dist/module/src/lib/classBuilder.js +6 -20
  86. package/dist/module/src/lib/core.js +11 -6
  87. package/dist/module/src/lib/index.js +12 -4
  88. package/dist/module/src/lib/pmProxy.js +1 -1
  89. package/dist/module/src/mothership/index.js +11 -0
  90. package/dist/module/src/mothership/test.js +60 -0
  91. package/dist/module/src/utils/queue.js +32 -0
  92. package/dist/module/src/utils.js +34 -5
  93. package/dist/module/testeranto.config.js +77 -36
  94. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  95. package/dist/prebuild/Project.js +3287 -385
  96. package/dist/prebuild/ReportClient.js +0 -24638
  97. package/dist/prebuild/TestReport.js +26 -22
  98. package/dist/prebuild/build.mjs +192 -70
  99. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
  100. package/dist/prebuild/init-docs.mjs +2 -5
  101. package/dist/prebuild/mothership/index.mjs +17 -0
  102. package/dist/prebuild/run.mjs +733 -433
  103. package/dist/types/src/CoreTypes.d.ts +51 -0
  104. package/dist/types/src/Node.d.ts +2 -2
  105. package/dist/types/src/NodeSidecar.d.ts +6 -0
  106. package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +23 -0
  107. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -0
  108. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -0
  109. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -0
  110. package/dist/types/src/PM/base.d.ts +6 -5
  111. package/dist/types/src/PM/index.d.ts +6 -4
  112. package/dist/types/src/PM/main.d.ts +23 -26
  113. package/dist/types/src/PM/node.d.ts +8 -6
  114. package/dist/types/src/PM/nodeSidecar.d.ts +13 -0
  115. package/dist/types/src/PM/pure.d.ts +4 -3
  116. package/dist/types/src/PM/pureSidecar.d.ts +11 -0
  117. package/dist/types/src/PM/sidecar.d.ts +8 -0
  118. package/dist/types/src/PM/web.d.ts +18 -8
  119. package/dist/types/src/PM/webSidecar.d.ts +11 -0
  120. package/dist/types/src/PureSidecar.d.ts +8 -0
  121. package/dist/types/src/SP__Polygon.test.d.ts +1 -0
  122. package/dist/types/src/Types.d.ts +80 -58
  123. package/dist/types/src/Web.d.ts +1 -1
  124. package/dist/types/src/WebSidecar.d.ts +8 -0
  125. package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +2 -0
  126. package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
  127. package/dist/types/src/lib/Sidecar.d.ts +5 -0
  128. package/dist/types/src/lib/abstractBase.d.ts +6 -12
  129. package/dist/types/src/lib/classBuilder.d.ts +7 -1
  130. package/dist/types/src/lib/core.d.ts +8 -2
  131. package/dist/types/src/lib/index.d.ts +10 -4
  132. package/dist/types/src/lib/types.d.ts +12 -2
  133. package/dist/types/src/mothership/index.d.ts +2 -0
  134. package/dist/types/src/mothership/test.d.ts +2 -0
  135. package/dist/types/src/utils/queue.d.ts +11 -0
  136. package/dist/types/src/utils.d.ts +4 -7
  137. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  138. package/docs/index.md +277 -0
  139. package/package.json +23 -104
  140. package/src/CoreTypes.ts +171 -0
  141. package/src/Init.ts +6 -5
  142. package/src/Node.ts +32 -15
  143. package/src/NodeSidecar.ts +22 -0
  144. package/src/PM/PM_WithEslintAndTsc.ts +315 -0
  145. package/src/PM/__tests__/nodeSidecar.testeranto.ts +173 -0
  146. package/src/PM/__tests__/pureSidecar.testeranto.ts +157 -0
  147. package/src/PM/__tests__/webSidecar.testeranto.ts +157 -0
  148. package/src/PM/base.ts +38 -17
  149. package/src/PM/index.ts +10 -4
  150. package/src/PM/main.ts +616 -589
  151. package/src/PM/node.ts +77 -33
  152. package/src/PM/nodeSidecar.ts +73 -0
  153. package/src/PM/pure.ts +68 -58
  154. package/src/PM/pureSidecar.ts +56 -0
  155. package/src/PM/sidecar.ts +48 -0
  156. package/src/PM/web.ts +42 -11
  157. package/src/PM/webSidecar.ts +55 -0
  158. package/src/Project.tsx +312 -109
  159. package/src/Pure.ts +0 -2
  160. package/src/PureSidecar.ts +14 -0
  161. package/src/ReportClient.tsx +164 -170
  162. package/src/SP__Polygon.test.ts +13 -0
  163. package/src/TestReport.tsx +77 -6
  164. package/src/Types.ts +278 -157
  165. package/src/Web.ts +0 -3
  166. package/src/WebSidecar.ts +14 -0
  167. package/src/build.ts +104 -16
  168. package/src/defaultConfig.ts +1 -0
  169. package/src/esbuildConfigs/README.md +46 -0
  170. package/src/esbuildConfigs/consoleDetectorPlugin.ts +29 -0
  171. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
  172. package/src/esbuildConfigs/node.ts +2 -18
  173. package/src/esbuildConfigs/pure.ts +19 -14
  174. package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
  175. package/src/esbuildConfigs/web.ts +15 -18
  176. package/src/lib/Sidecar.ts +6 -0
  177. package/src/lib/TEST_ADAPTER_RENAME.md +48 -0
  178. package/src/lib/abstractBase.ts +18 -10
  179. package/src/lib/basebuilder.ts +5 -4
  180. package/src/lib/classBuilder.ts +19 -21
  181. package/src/lib/core.ts +28 -19
  182. package/src/lib/index.ts +38 -18
  183. package/src/lib/pmProxy.ts +3 -1
  184. package/src/lib/types.ts +15 -2
  185. package/src/mothership/index.ts +15 -0
  186. package/src/mothership/test.ts +137 -0
  187. package/src/run.ts +0 -1
  188. package/src/utils/queue.ts +41 -0
  189. package/src/utils.ts +41 -15
  190. package/testeranto/bundles/node/mothership/chunk-PG6KUKNP.mjs +44 -0
  191. package/testeranto/bundles/node/mothership/chunk-V2EQEXU2.mjs +1032 -0
  192. package/testeranto/bundles/node/mothership/metafile.json +389 -0
  193. package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +1219 -0
  194. package/testeranto/bundles/node/mothership/src/PM/__tests__/pureSidecar.testeranto.mjs +156 -0
  195. package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +1199 -0
  196. package/testeranto/bundles/node/mothership/src/PM/__tests__/webSidecar.testeranto.mjs +156 -0
  197. package/testeranto/bundles/node/mothership/src/mothership/test.mjs +24411 -0
  198. package/testeranto/bundles/pure/mothership/metafile.json +8 -0
  199. package/testeranto/bundles/web/mothership/metafile.json +8 -0
  200. package/testeranto/index.html +4 -4
  201. package/testeranto/reports/mothership/config.json +25 -0
  202. package/testeranto/reports/{redux → mothership}/index.html +8 -8
  203. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
  204. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +20 -0
  205. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +1564 -0
  206. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/log.txt +0 -0
  207. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +22 -0
  208. package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +35 -0
  209. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html +20 -0
  210. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +80 -0
  211. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +12 -0
  212. package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +26 -0
  213. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +1 -0
  214. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
  215. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/index.html +20 -0
  216. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +1564 -0
  217. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
  218. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +22 -0
  219. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +56 -0
  220. package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +29 -0
  221. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html +20 -0
  222. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +80 -0
  223. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +12 -0
  224. package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +26 -0
  225. package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +1 -0
  226. package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +4 -0
  227. package/testeranto/reports/mothership/src/mothership/test/node/index.html +20 -0
  228. package/testeranto/reports/mothership/src/mothership/test/node/lint_errors.json +1 -0
  229. package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
  230. package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +12 -0
  231. package/testeranto/reports/mothership/src/mothership/test/node/tests.json +24 -0
  232. package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +18 -0
  233. package/testeranto/reports/mothership/summary.json +9 -0
  234. package/testeranto.config.ts +82 -44
  235. package/tsc.log +78 -81
  236. package/dist/common/src/SubPackages/react/component/index.js +0 -20
  237. package/dist/common/src/SubPackages/react/component/node.js +0 -10
  238. package/dist/common/src/SubPackages/react/component/pure.js +0 -10
  239. package/dist/common/src/SubPackages/react/component/web.js +0 -10
  240. package/dist/common/src/SubPackages/react/jsx/index.js +0 -64
  241. package/dist/common/src/SubPackages/react/jsx/node.js +0 -10
  242. package/dist/common/src/SubPackages/react/jsx/pure.js +0 -10
  243. package/dist/common/src/SubPackages/react/jsx/web.js +0 -10
  244. package/dist/common/src/SubPackages/react-dom/component/dynamic.js +0 -61
  245. package/dist/common/src/SubPackages/react-dom/component/node.js +0 -10
  246. package/dist/common/src/SubPackages/react-dom/component/pure.js +0 -10
  247. package/dist/common/src/SubPackages/react-dom/component/static.js +0 -26
  248. package/dist/common/src/SubPackages/react-dom/component/web.js +0 -16
  249. package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +0 -31
  250. package/dist/common/src/SubPackages/react-dom/jsx/node.js +0 -10
  251. package/dist/common/src/SubPackages/react-dom/jsx/pure.js +0 -10
  252. package/dist/common/src/SubPackages/react-dom/jsx/static.js +0 -59
  253. package/dist/common/src/SubPackages/react-dom/jsx/web.js +0 -16
  254. package/dist/common/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
  255. package/dist/common/src/SubPackages/react-test-renderer/component/index.js +0 -15
  256. package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +0 -70
  257. package/dist/common/src/SubPackages/react-test-renderer/component/node.js +0 -8
  258. package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +0 -8
  259. package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -57
  260. package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +0 -10
  261. package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +0 -10
  262. package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +0 -10
  263. package/dist/common/src/SubPackages/react-test-renderer/component/web.js +0 -8
  264. package/dist/common/src/SubPackages/react-test-renderer/fc/node.js +0 -60
  265. package/dist/common/src/SubPackages/react-test-renderer/fc/web.js +0 -60
  266. package/dist/common/src/SubPackages/react-test-renderer/jsx/index.js +0 -67
  267. package/dist/common/src/SubPackages/react-test-renderer/jsx/node.js +0 -10
  268. package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +0 -10
  269. package/dist/common/src/SubPackages/react-test-renderer/jsx/web.js +0 -10
  270. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
  271. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
  272. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
  273. package/dist/common/src/examples/react/component/index.js +0 -33
  274. package/dist/common/src/examples/react/component/test.js +0 -36
  275. package/dist/module/src/SubPackages/react/component/index.js +0 -13
  276. package/dist/module/src/SubPackages/react/component/node.js +0 -5
  277. package/dist/module/src/SubPackages/react/component/pure.js +0 -5
  278. package/dist/module/src/SubPackages/react/component/web.js +0 -5
  279. package/dist/module/src/SubPackages/react/jsx/index.js +0 -58
  280. package/dist/module/src/SubPackages/react/jsx/node.js +0 -5
  281. package/dist/module/src/SubPackages/react/jsx/pure.js +0 -5
  282. package/dist/module/src/SubPackages/react/jsx/web.js +0 -5
  283. package/dist/module/src/SubPackages/react-dom/component/dynamic.js +0 -54
  284. package/dist/module/src/SubPackages/react-dom/component/node.js +0 -5
  285. package/dist/module/src/SubPackages/react-dom/component/pure.js +0 -5
  286. package/dist/module/src/SubPackages/react-dom/component/static.js +0 -22
  287. package/dist/module/src/SubPackages/react-dom/component/web.js +0 -11
  288. package/dist/module/src/SubPackages/react-dom/jsx/dynamic.js +0 -27
  289. package/dist/module/src/SubPackages/react-dom/jsx/node.js +0 -5
  290. package/dist/module/src/SubPackages/react-dom/jsx/pure.js +0 -5
  291. package/dist/module/src/SubPackages/react-dom/jsx/static.js +0 -53
  292. package/dist/module/src/SubPackages/react-dom/jsx/web.js +0 -11
  293. package/dist/module/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
  294. package/dist/module/src/SubPackages/react-test-renderer/component/index.js +0 -14
  295. package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +0 -31
  296. package/dist/module/src/SubPackages/react-test-renderer/component/node.js +0 -3
  297. package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +0 -3
  298. package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -54
  299. package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +0 -5
  300. package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +0 -5
  301. package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +0 -5
  302. package/dist/module/src/SubPackages/react-test-renderer/component/web.js +0 -3
  303. package/dist/module/src/SubPackages/react-test-renderer/fc/node.js +0 -22
  304. package/dist/module/src/SubPackages/react-test-renderer/fc/web.js +0 -22
  305. package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +0 -28
  306. package/dist/module/src/SubPackages/react-test-renderer/jsx/node.js +0 -5
  307. package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +0 -5
  308. package/dist/module/src/SubPackages/react-test-renderer/jsx/web.js +0 -5
  309. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
  310. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
  311. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
  312. package/dist/module/src/examples/react/component/index.js +0 -26
  313. package/dist/module/src/examples/react/component/test.js +0 -32
  314. package/dist/prebuild/ReportClient.css +0 -11342
  315. package/dist/tsconfig.tsbuildinfo +0 -1
  316. package/dist/types/src/SubPackages/react/component/index.d.ts +0 -4
  317. package/dist/types/src/SubPackages/react/component/node.d.ts +0 -4
  318. package/dist/types/src/SubPackages/react/component/pure.d.ts +0 -4
  319. package/dist/types/src/SubPackages/react/component/web.d.ts +0 -4
  320. package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -5
  321. package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
  322. package/dist/types/src/SubPackages/react/jsx/pure.d.ts +0 -4
  323. package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
  324. package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +0 -20
  325. package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -4
  326. package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +0 -4
  327. package/dist/types/src/SubPackages/react-dom/component/static.d.ts +0 -9
  328. package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -4
  329. package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +0 -5
  330. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -6
  331. package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -4
  332. package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +0 -4
  333. package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +0 -5
  334. package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
  335. package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
  336. package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -5
  337. package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +0 -3
  338. package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -4
  339. package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +0 -4
  340. package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +0 -4
  341. package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +0 -3
  342. package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +0 -4
  343. package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +0 -3
  344. package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -4
  345. package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  346. package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
  347. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -11
  348. package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -4
  349. package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +0 -4
  350. package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -4
  351. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
  352. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
  353. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
  354. package/dist/types/src/examples/react/component/index.d.ts +0 -13
  355. package/dist/types/src/examples/react/component/test.d.ts +0 -17
  356. package/src/SubPackages/react/component/index.ts +0 -28
  357. package/src/SubPackages/react/component/node.ts +0 -17
  358. package/src/SubPackages/react/component/pure.ts +0 -17
  359. package/src/SubPackages/react/component/web.ts +0 -17
  360. package/src/SubPackages/react/jsx/index.ts +0 -75
  361. package/src/SubPackages/react/jsx/node.ts +0 -23
  362. package/src/SubPackages/react/jsx/pure.ts +0 -23
  363. package/src/SubPackages/react/jsx/web.ts +0 -24
  364. package/src/SubPackages/react-dom/component/dynamic.ts +0 -107
  365. package/src/SubPackages/react-dom/component/node.ts +0 -17
  366. package/src/SubPackages/react-dom/component/pure.ts +0 -17
  367. package/src/SubPackages/react-dom/component/static.ts +0 -41
  368. package/src/SubPackages/react-dom/component/web.ts +0 -32
  369. package/src/SubPackages/react-dom/jsx/dynamic.ts +0 -46
  370. package/src/SubPackages/react-dom/jsx/index.ts +0 -6
  371. package/src/SubPackages/react-dom/jsx/node.ts +0 -18
  372. package/src/SubPackages/react-dom/jsx/pure.ts +0 -18
  373. package/src/SubPackages/react-dom/jsx/static.ts +0 -87
  374. package/src/SubPackages/react-dom/jsx/web.ts +0 -26
  375. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +0 -54
  376. package/src/SubPackages/react-test-renderer/component/index.ts +0 -32
  377. package/src/SubPackages/react-test-renderer/component/interface.ts +0 -43
  378. package/src/SubPackages/react-test-renderer/component/node.ts +0 -18
  379. package/src/SubPackages/react-test-renderer/component/pure.ts +0 -18
  380. package/src/SubPackages/react-test-renderer/component/test/implementation.ts +0 -63
  381. package/src/SubPackages/react-test-renderer/component/test/node.ts +0 -14
  382. package/src/SubPackages/react-test-renderer/component/test/pure.ts +0 -14
  383. package/src/SubPackages/react-test-renderer/component/test/web.ts +0 -14
  384. package/src/SubPackages/react-test-renderer/component/web.ts +0 -18
  385. package/src/SubPackages/react-test-renderer/fc/node.ts +0 -83
  386. package/src/SubPackages/react-test-renderer/fc/web.ts +0 -80
  387. package/src/SubPackages/react-test-renderer/jsx/index.ts +0 -61
  388. package/src/SubPackages/react-test-renderer/jsx/node.ts +0 -31
  389. package/src/SubPackages/react-test-renderer/jsx/pure.ts +0 -31
  390. package/src/SubPackages/react-test-renderer/jsx/web.ts +0 -32
  391. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +0 -73
  392. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +0 -36
  393. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +0 -36
  394. package/src/examples/react/component/index.tsx +0 -35
  395. package/src/examples/react/component/test.ts +0 -83
  396. package/testeranto/bundles/node/redux/metafile.json +0 -559
  397. package/testeranto/bundles/pure/redux/metafile.json +0 -554
  398. package/testeranto/bundles/web/redux/metafile.json +0 -504
  399. package/testeranto/bundles/web/redux/test/web.html +0 -19
  400. package/testeranto/reports/redux/config.json +0 -38
  401. package/testeranto/reports/redux/summary.json +0 -20
  402. /package/dist/common/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
  403. /package/dist/module/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
@@ -0,0 +1,1032 @@
1
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined")
12
+ return require.apply(this, arguments);
13
+ throw new Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
+ // If the importer is in node compatibility mode or this is not an ESM
28
+ // file that has been converted to a CommonJS file using a Babel-
29
+ // compatible transform (i.e. "__esModule" has not been set), then set
30
+ // "default" to the CommonJS "module.exports" for node compatibility.
31
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
+ mod
33
+ ));
34
+
35
+ // src/lib/index.ts
36
+ var BaseTestInterface = {
37
+ beforeAll: async (s) => s,
38
+ beforeEach: async function(subject, initialValues, x, testResource, pm) {
39
+ return subject;
40
+ },
41
+ afterEach: async (s) => s,
42
+ afterAll: (store) => void 0,
43
+ butThen: async (store, thenCb) => {
44
+ return thenCb(store);
45
+ },
46
+ andWhen: async (store, whenCB, testResource, pm) => {
47
+ await whenCB(store, testResource, pm);
48
+ },
49
+ assertThis: (x) => x
50
+ };
51
+ var DefaultTestInterface = (p) => {
52
+ return {
53
+ ...BaseTestInterface,
54
+ ...p
55
+ };
56
+ };
57
+ var defaultTestResourceRequirement = {
58
+ ports: 0
59
+ };
60
+
61
+ // src/lib/pmProxy.ts
62
+ var prxy = function(pm, mappings) {
63
+ return new Proxy(pm, {
64
+ get: (target, prop, receiver) => {
65
+ for (const mapping of mappings) {
66
+ const method = mapping[0];
67
+ const arger = mapping[1];
68
+ if (prop === method) {
69
+ return (...x) => target[prop](arger(...x));
70
+ }
71
+ }
72
+ return (...x) => target[prop](...x);
73
+ }
74
+ });
75
+ };
76
+ var butThenProxy = (pm, filepath) => prxy(pm, [
77
+ [
78
+ "screencast",
79
+ (opts, p) => [
80
+ {
81
+ ...opts,
82
+ path: `${filepath}/butThen/${opts.path}`
83
+ },
84
+ p
85
+ ]
86
+ ],
87
+ ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
88
+ [
89
+ "writeFileSync",
90
+ (fp, contents) => [`${filepath}/butThen/${fp}`, contents]
91
+ ],
92
+ [
93
+ "customScreenShot",
94
+ (opts, p) => [
95
+ {
96
+ ...opts,
97
+ path: `${filepath}/butThen/${opts.path}`
98
+ },
99
+ p
100
+ ]
101
+ ]
102
+ ]);
103
+ var andWhenProxy = (pm, filepath) => prxy(pm, [
104
+ [
105
+ "screencast",
106
+ (opts, p) => [
107
+ {
108
+ ...opts,
109
+ path: `${filepath}/andWhen/${opts.path}`
110
+ },
111
+ p
112
+ ]
113
+ ],
114
+ ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
115
+ ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
116
+ [
117
+ "customScreenShot",
118
+ (opts, p) => [
119
+ {
120
+ ...opts,
121
+ path: `${filepath}/andWhen${opts.path}`
122
+ },
123
+ p
124
+ ]
125
+ ]
126
+ ]);
127
+ var afterEachProxy = (pm, suite, given) => prxy(pm, [
128
+ [
129
+ "screencast",
130
+ (opts, p) => [
131
+ {
132
+ ...opts,
133
+ path: `suite-${suite}/given-${given}/afterEach/${opts.path}`
134
+ },
135
+ p
136
+ ]
137
+ ],
138
+ ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
139
+ [
140
+ "writeFileSync",
141
+ (fp, contents) => [
142
+ `suite-${suite}/given-${given}/afterEach/${fp}`,
143
+ contents
144
+ ]
145
+ ],
146
+ [
147
+ "customScreenShot",
148
+ (opts, p) => [
149
+ {
150
+ ...opts,
151
+ path: `suite-${suite}/given-${given}/afterEach/${opts.path}`
152
+ },
153
+ p
154
+ ]
155
+ ]
156
+ ]);
157
+ var beforeEachProxy = (pm, suite) => prxy(pm, [
158
+ [
159
+ "screencast",
160
+ (opts, p) => [
161
+ {
162
+ ...opts,
163
+ path: `suite-${suite}/beforeEach/${opts.path}`
164
+ },
165
+ p
166
+ ]
167
+ ],
168
+ [
169
+ "writeFileSync",
170
+ (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents]
171
+ ],
172
+ [
173
+ "customScreenShot",
174
+ (opts, p) => [
175
+ {
176
+ ...opts,
177
+ path: `suite-${suite}/beforeEach/${opts.path}`
178
+ },
179
+ p
180
+ ]
181
+ ],
182
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]]
183
+ ]);
184
+ var beforeAllProxy = (pm, suite) => prxy(pm, [
185
+ [
186
+ "writeFileSync",
187
+ (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents]
188
+ ],
189
+ [
190
+ "customScreenShot",
191
+ (opts, p) => [
192
+ {
193
+ ...opts,
194
+ path: `suite-${suite}/beforeAll/${opts.path}`
195
+ },
196
+ p
197
+ ]
198
+ ],
199
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]]
200
+ ]);
201
+ var afterAllProxy = (pm, suite) => prxy(pm, [
202
+ ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
203
+ [
204
+ "writeFileSync",
205
+ (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents]
206
+ ],
207
+ [
208
+ "customScreenShot",
209
+ (opts, p) => [
210
+ {
211
+ ...opts,
212
+ path: `suite-${suite}/afterAll/${opts.path}`
213
+ },
214
+ p
215
+ ]
216
+ ]
217
+ ]);
218
+
219
+ // src/lib/abstractBase.ts
220
+ var BaseSuite = class {
221
+ constructor(name, index, givens = {}, checks = []) {
222
+ this.name = name;
223
+ this.index = index;
224
+ this.givens = givens;
225
+ this.checks = checks;
226
+ this.fails = 0;
227
+ }
228
+ features() {
229
+ const features = Object.keys(this.givens).map((k) => this.givens[k].features).flat().filter((value, index, array) => {
230
+ return array.indexOf(value) === index;
231
+ });
232
+ return features || [];
233
+ }
234
+ toObj() {
235
+ const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
236
+ const checks = Object.keys(this.checks).map((k) => this.checks[k].toObj());
237
+ return {
238
+ name: this.name,
239
+ givens,
240
+ checks,
241
+ fails: this.fails,
242
+ failed: this.failed,
243
+ features: this.features()
244
+ };
245
+ }
246
+ setup(s, artifactory, tr, pm) {
247
+ return new Promise((res) => res(s));
248
+ }
249
+ assertThat(t) {
250
+ return !!t;
251
+ }
252
+ afterAll(store, artifactory, pm) {
253
+ return store;
254
+ }
255
+ async run(input, testResourceConfiguration, artifactory, tLog, pm) {
256
+ this.testResourceConfiguration = testResourceConfiguration;
257
+ const suiteArtifactory = (fPath, value) => artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
258
+ tLog("\nSuite:", this.index, this.name);
259
+ const sNdx = this.index;
260
+ const subject = await this.setup(
261
+ input,
262
+ suiteArtifactory,
263
+ testResourceConfiguration,
264
+ beforeAllProxy(pm, sNdx.toString())
265
+ );
266
+ for (const [gKey, g] of Object.entries(this.givens)) {
267
+ const giver = this.givens[gKey];
268
+ try {
269
+ this.store = await giver.give(
270
+ subject,
271
+ gKey,
272
+ testResourceConfiguration,
273
+ this.assertThat,
274
+ suiteArtifactory,
275
+ tLog,
276
+ pm,
277
+ sNdx
278
+ );
279
+ } catch (e) {
280
+ this.failed = true;
281
+ this.fails = this.fails + 1;
282
+ }
283
+ }
284
+ for (const [ndx, thater] of this.checks.entries()) {
285
+ await thater.check(
286
+ subject,
287
+ thater.name,
288
+ testResourceConfiguration,
289
+ this.assertThat,
290
+ suiteArtifactory,
291
+ tLog,
292
+ pm
293
+ );
294
+ }
295
+ try {
296
+ this.afterAll(
297
+ this.store,
298
+ artifactory,
299
+ afterAllProxy(pm, sNdx.toString())
300
+ );
301
+ } catch (e) {
302
+ console.error(e);
303
+ }
304
+ return this;
305
+ }
306
+ };
307
+ var BaseGiven = class {
308
+ constructor(name, features, whens, thens, givenCB, initialValues) {
309
+ this.name = name;
310
+ this.features = features;
311
+ this.whens = whens;
312
+ this.thens = thens;
313
+ this.givenCB = givenCB;
314
+ this.initialValues = initialValues;
315
+ }
316
+ beforeAll(store) {
317
+ return store;
318
+ }
319
+ toObj() {
320
+ return {
321
+ key: this.key,
322
+ name: this.name,
323
+ whens: this.whens.map((w) => w.toObj()),
324
+ thens: this.thens.map((t) => t.toObj()),
325
+ error: this.error ? [this.error, this.error.stack] : null,
326
+ failed: this.failed,
327
+ features: this.features
328
+ };
329
+ }
330
+ async afterEach(store, key, artifactory, pm) {
331
+ return store;
332
+ }
333
+ async give(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm, suiteNdx) {
334
+ this.key = key;
335
+ tLog(`
336
+ ${this.key}`);
337
+ tLog(`
338
+ Given: ${this.name}`);
339
+ const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
340
+ this.uberCatcher((e) => {
341
+ console.error(e);
342
+ this.error = e.error;
343
+ tLog(e.stack);
344
+ });
345
+ try {
346
+ this.store = await this.givenThat(
347
+ subject,
348
+ testResourceConfiguration,
349
+ givenArtifactory,
350
+ this.givenCB,
351
+ this.initialValues,
352
+ beforeEachProxy(pm, suiteNdx.toString())
353
+ );
354
+ } catch (e) {
355
+ console.error("failure 4 ", e);
356
+ this.error = e;
357
+ throw e;
358
+ }
359
+ try {
360
+ for (const [whenNdx, whenStep] of this.whens.entries()) {
361
+ await whenStep.test(
362
+ this.store,
363
+ testResourceConfiguration,
364
+ tLog,
365
+ pm,
366
+ `suite-${suiteNdx}/given-${key}/when/${whenNdx}`
367
+ );
368
+ }
369
+ for (const [thenNdx, thenStep] of this.thens.entries()) {
370
+ const t = await thenStep.test(
371
+ this.store,
372
+ testResourceConfiguration,
373
+ tLog,
374
+ pm,
375
+ `suite-${suiteNdx}/given-${key}/then-${thenNdx}`
376
+ );
377
+ return tester(t);
378
+ }
379
+ } catch (e) {
380
+ this.failed = true;
381
+ tLog(e.stack);
382
+ throw e;
383
+ } finally {
384
+ try {
385
+ await this.afterEach(
386
+ this.store,
387
+ this.key,
388
+ givenArtifactory,
389
+ afterEachProxy(pm, suiteNdx.toString(), key)
390
+ );
391
+ } catch (e) {
392
+ console.error("afterEach failed!", e);
393
+ this.failed = e;
394
+ throw e;
395
+ }
396
+ }
397
+ return this.store;
398
+ }
399
+ };
400
+ var BaseWhen = class {
401
+ constructor(name, whenCB) {
402
+ this.name = name;
403
+ this.whenCB = whenCB;
404
+ }
405
+ toObj() {
406
+ console.log("toObj error", this.error);
407
+ return {
408
+ name: this.name,
409
+ error: this.error && this.error.name + this.error.stack
410
+ };
411
+ }
412
+ async test(store, testResourceConfiguration, tLog, pm, filepath) {
413
+ tLog(" When:", this.name);
414
+ return await this.andWhen(
415
+ store,
416
+ this.whenCB,
417
+ testResourceConfiguration,
418
+ andWhenProxy(pm, filepath)
419
+ ).catch((e) => {
420
+ console.log("MARK9", e);
421
+ this.error = e;
422
+ throw e;
423
+ });
424
+ }
425
+ };
426
+ var BaseThen = class {
427
+ constructor(name, thenCB) {
428
+ this.name = name;
429
+ this.thenCB = thenCB;
430
+ this.error = false;
431
+ }
432
+ toObj() {
433
+ return {
434
+ name: this.name,
435
+ error: this.error
436
+ };
437
+ }
438
+ async test(store, testResourceConfiguration, tLog, pm, filepath) {
439
+ return this.butThen(
440
+ store,
441
+ async (s) => {
442
+ tLog(" Then!!!:", this.name);
443
+ if (typeof this.thenCB === "function") {
444
+ return await this.thenCB(s);
445
+ } else {
446
+ return this.thenCB;
447
+ }
448
+ },
449
+ testResourceConfiguration,
450
+ butThenProxy(pm, filepath)
451
+ ).catch((e) => {
452
+ console.log("test failed 3", e);
453
+ this.error = e;
454
+ throw e;
455
+ });
456
+ }
457
+ check() {
458
+ }
459
+ };
460
+ var BaseCheck = class {
461
+ constructor(name, features, checker, x, checkCB) {
462
+ this.name = name;
463
+ this.features = features;
464
+ this.checkCB = checkCB;
465
+ this.checker = checker;
466
+ }
467
+ toObj() {
468
+ return {
469
+ key: this.key,
470
+ name: this.name,
471
+ // functionAsString: this.checkCB.toString(),
472
+ features: this.features
473
+ };
474
+ }
475
+ async afterEach(store, key, artifactory, pm) {
476
+ return store;
477
+ }
478
+ beforeAll(store) {
479
+ return store;
480
+ }
481
+ async check(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm) {
482
+ this.key = key;
483
+ tLog(`
484
+ Check: ${this.name}`);
485
+ this.store = await this.checkThat(
486
+ subject,
487
+ testResourceConfiguration,
488
+ artifactory,
489
+ this.checkCB,
490
+ this.initialValues,
491
+ pm
492
+ );
493
+ await this.checker(this.store, pm);
494
+ return;
495
+ }
496
+ };
497
+
498
+ // src/lib/basebuilder.ts
499
+ var BaseBuilder = class {
500
+ constructor(input, suitesOverrides, givenOverides, whenOverides, thenOverides, checkOverides, testResourceRequirement, testSpecification) {
501
+ this.artifacts = [];
502
+ this.artifacts = [];
503
+ this.testResourceRequirement = testResourceRequirement;
504
+ this.suitesOverrides = suitesOverrides;
505
+ this.givenOverides = givenOverides;
506
+ this.whenOverides = whenOverides;
507
+ this.thenOverides = thenOverides;
508
+ this.checkOverides = checkOverides;
509
+ this.testSpecification = testSpecification;
510
+ this.specs = testSpecification(
511
+ this.Suites(),
512
+ this.Given(),
513
+ this.When(),
514
+ this.Then(),
515
+ this.Check()
516
+ );
517
+ this.testJobs = this.specs.map((suite) => {
518
+ const suiteRunner = (suite2) => async (puppetMaster, tLog) => {
519
+ const x = await suite2.run(
520
+ input,
521
+ puppetMaster.testResourceConfiguration,
522
+ (fPath, value) => puppetMaster.testArtiFactoryfileWriter(
523
+ tLog,
524
+ (p) => {
525
+ this.artifacts.push(p);
526
+ }
527
+ )(puppetMaster.testResourceConfiguration.fs + "/" + fPath, value),
528
+ tLog,
529
+ puppetMaster
530
+ );
531
+ return x;
532
+ };
533
+ const runner = suiteRunner(suite);
534
+ return {
535
+ test: suite,
536
+ toObj: () => {
537
+ return suite.toObj();
538
+ },
539
+ runner,
540
+ receiveTestResourceConfig: async function(puppetMaster) {
541
+ const logFilePath = "log.txt";
542
+ const access = await puppetMaster.createWriteStream(
543
+ logFilePath
544
+ );
545
+ const tLog = async (...l) => {
546
+ };
547
+ const suiteDone = await runner(puppetMaster, tLog);
548
+ const logPromise = new Promise(async (res) => {
549
+ await puppetMaster.end(access);
550
+ res(true);
551
+ });
552
+ const fails = suiteDone.fails;
553
+ await puppetMaster.writeFileSync(`bdd_errors.txt`, fails.toString());
554
+ await puppetMaster.writeFileSync(
555
+ `tests.json`,
556
+ JSON.stringify(this.toObj(), null, 2)
557
+ );
558
+ return {
559
+ failed: fails > 0,
560
+ fails,
561
+ artifacts: this.artifacts || [],
562
+ logPromise,
563
+ features: suiteDone.features()
564
+ };
565
+ }
566
+ };
567
+ });
568
+ }
569
+ // testsJson() {
570
+ // puppetMaster.writeFileSync(
571
+ // `tests.json`,
572
+ // JSON.stringify({ features: suiteDone.features() }, null, 2)
573
+ // );
574
+ // }
575
+ Specs() {
576
+ return this.specs;
577
+ }
578
+ Suites() {
579
+ return this.suitesOverrides;
580
+ }
581
+ Given() {
582
+ return this.givenOverides;
583
+ }
584
+ When() {
585
+ return this.whenOverides;
586
+ }
587
+ Then() {
588
+ return this.thenOverides;
589
+ }
590
+ Check() {
591
+ return this.checkOverides;
592
+ }
593
+ };
594
+
595
+ // src/lib/classBuilder.ts
596
+ var ClassBuilder = class extends BaseBuilder {
597
+ constructor(testImplementation, testSpecification, input, suiteKlasser, givenKlasser, whenKlasser, thenKlasser, checkKlasser, testResourceRequirement) {
598
+ const classySuites = Object.entries(testImplementation.suites).reduce(
599
+ (a, [key], index) => {
600
+ a[key] = (somestring, givens, checks) => {
601
+ return new suiteKlasser.prototype.constructor(
602
+ somestring,
603
+ index,
604
+ givens,
605
+ checks
606
+ );
607
+ };
608
+ return a;
609
+ },
610
+ {}
611
+ );
612
+ const classyGivens = Object.entries(testImplementation.givens).reduce(
613
+ (a, [key, g]) => {
614
+ a[key] = (features, whens, thens, ...initialValues) => {
615
+ return new givenKlasser.prototype.constructor(
616
+ key,
617
+ features,
618
+ whens,
619
+ thens,
620
+ testImplementation.givens[key],
621
+ initialValues
622
+ );
623
+ };
624
+ return a;
625
+ },
626
+ {}
627
+ );
628
+ const classyWhens = Object.entries(testImplementation.whens).reduce(
629
+ (a, [key, whEn]) => {
630
+ a[key] = (payload) => {
631
+ return new whenKlasser.prototype.constructor(
632
+ `${whEn.name}: ${payload && payload.toString()}`,
633
+ whEn(payload)
634
+ );
635
+ };
636
+ return a;
637
+ },
638
+ {}
639
+ );
640
+ const classyThens = Object.entries(testImplementation.thens).reduce(
641
+ (a, [key, thEn]) => {
642
+ a[key] = (expected, ...x) => {
643
+ return new thenKlasser.prototype.constructor(
644
+ `${thEn.name}: ${expected && expected.toString()}`,
645
+ thEn(expected, ...x)
646
+ );
647
+ };
648
+ return a;
649
+ },
650
+ {}
651
+ );
652
+ const classyChecks = Object.entries(testImplementation.checks).reduce(
653
+ (a, [key, chEck]) => {
654
+ a[key] = (name, features, checker) => {
655
+ return new checkKlasser.prototype.constructor(
656
+ key,
657
+ features,
658
+ chEck,
659
+ checker
660
+ );
661
+ };
662
+ return a;
663
+ },
664
+ {}
665
+ );
666
+ super(
667
+ input,
668
+ classySuites,
669
+ classyGivens,
670
+ classyWhens,
671
+ classyThens,
672
+ classyChecks,
673
+ testResourceRequirement,
674
+ testSpecification
675
+ );
676
+ }
677
+ };
678
+
679
+ // src/lib/core.ts
680
+ var Testeranto = class extends ClassBuilder {
681
+ constructor(input, testSpecification, testImplementation, testResourceRequirement = defaultTestResourceRequirement, testInterface, uberCatcher) {
682
+ const fullTestInterface = DefaultTestInterface(testInterface);
683
+ super(
684
+ testImplementation,
685
+ testSpecification,
686
+ input,
687
+ class extends BaseSuite {
688
+ afterAll(store, artifactory, pm) {
689
+ return fullTestInterface.afterAll(store, pm);
690
+ }
691
+ assertThat(t) {
692
+ return fullTestInterface.assertThis(t);
693
+ }
694
+ async setup(s, artifactory, tr, pm) {
695
+ return (fullTestInterface.beforeAll || (async (input2, artifactory2, tr2, pm2) => input2))(
696
+ s,
697
+ this.testResourceConfiguration,
698
+ // artifactory,
699
+ pm
700
+ );
701
+ }
702
+ },
703
+ class Given extends BaseGiven {
704
+ constructor() {
705
+ super(...arguments);
706
+ this.uberCatcher = uberCatcher;
707
+ }
708
+ async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
709
+ return fullTestInterface.beforeEach(
710
+ subject,
711
+ initializer,
712
+ testResource,
713
+ initialValues,
714
+ pm
715
+ );
716
+ }
717
+ afterEach(store, key, artifactory, pm) {
718
+ return new Promise(
719
+ (res) => res(fullTestInterface.afterEach(store, key, pm))
720
+ );
721
+ }
722
+ },
723
+ class When extends BaseWhen {
724
+ async andWhen(store, whenCB, testResource, pm) {
725
+ return await fullTestInterface.andWhen(
726
+ store,
727
+ whenCB,
728
+ testResource,
729
+ pm
730
+ );
731
+ }
732
+ },
733
+ class Then extends BaseThen {
734
+ async butThen(store, thenCB, testResource, pm) {
735
+ return await fullTestInterface.butThen(
736
+ store,
737
+ thenCB,
738
+ testResource,
739
+ pm
740
+ );
741
+ }
742
+ },
743
+ class Check extends BaseCheck {
744
+ constructor(name, features, checkCallback, x, i, c) {
745
+ super(name, features, checkCallback, x, c);
746
+ this.initialValues = i;
747
+ }
748
+ async checkThat(subject, testResourceConfiguration, artifactory, initializer, initialValues, pm) {
749
+ return fullTestInterface.beforeEach(
750
+ subject,
751
+ initializer,
752
+ testResourceConfiguration,
753
+ initialValues,
754
+ pm
755
+ );
756
+ }
757
+ afterEach(store, key, artifactory, pm) {
758
+ return new Promise(
759
+ (res) => res(fullTestInterface.afterEach(store, key, pm))
760
+ );
761
+ }
762
+ },
763
+ testResourceRequirement
764
+ );
765
+ }
766
+ };
767
+
768
+ // src/PM/node.ts
769
+ import net from "net";
770
+ import fs from "fs";
771
+ import path from "path";
772
+
773
+ // src/PM/index.ts
774
+ var PM = class {
775
+ };
776
+
777
+ // src/PM/node.ts
778
+ var fPaths = [];
779
+ var PM_Node = class extends PM {
780
+ constructor(t, ipcFile) {
781
+ super();
782
+ this.testResourceConfiguration = t;
783
+ this.client = net.createConnection(ipcFile, () => {
784
+ return;
785
+ });
786
+ }
787
+ start() {
788
+ throw new Error("DEPREFECATED");
789
+ }
790
+ stop() {
791
+ throw new Error("stop not implemented.");
792
+ }
793
+ send(command, ...argz) {
794
+ const key = Math.random().toString();
795
+ if (!this.client) {
796
+ console.error(
797
+ `Tried to send "${command} (${argz})" but the test has not been started and the IPC client is not established. Exiting as failure!`
798
+ );
799
+ process.exit(-1);
800
+ }
801
+ return new Promise((res) => {
802
+ const myListener = (event) => {
803
+ const x = JSON.parse(event);
804
+ if (x.key === key) {
805
+ process.removeListener("message", myListener);
806
+ res(x.payload);
807
+ }
808
+ };
809
+ process.addListener("message", myListener);
810
+ this.client.write(JSON.stringify([command, ...argz, key]));
811
+ });
812
+ }
813
+ async launchSideCar(n) {
814
+ return this.send(
815
+ "launchSideCar",
816
+ n,
817
+ this.testResourceConfiguration.name
818
+ );
819
+ }
820
+ stopSideCar(n) {
821
+ return this.send(
822
+ "stopSideCar",
823
+ n,
824
+ this.testResourceConfiguration.name
825
+ );
826
+ }
827
+ async pages() {
828
+ return this.send("pages", ...arguments);
829
+ }
830
+ waitForSelector(p, s) {
831
+ return this.send("waitForSelector", ...arguments);
832
+ }
833
+ closePage(p) {
834
+ return this.send("closePage", ...arguments);
835
+ }
836
+ goto(page, url) {
837
+ return this.send("goto", ...arguments);
838
+ }
839
+ async newPage() {
840
+ return this.send("newPage");
841
+ }
842
+ $(selector, page) {
843
+ return this.send("$", ...arguments);
844
+ }
845
+ isDisabled(selector) {
846
+ return this.send("isDisabled", ...arguments);
847
+ }
848
+ getAttribute(selector, attribute, p) {
849
+ return this.send("getAttribute", ...arguments);
850
+ }
851
+ getInnerHtml(selector, p) {
852
+ return this.send("getInnerHtml", ...arguments);
853
+ }
854
+ // setValue(selector: string) {
855
+ // return this.send("getValue", ...arguments);
856
+ // }
857
+ focusOn(selector) {
858
+ return this.send("focusOn", ...arguments);
859
+ }
860
+ typeInto(selector) {
861
+ return this.send("typeInto", ...arguments);
862
+ }
863
+ page() {
864
+ return this.send("page");
865
+ }
866
+ click(selector) {
867
+ return this.send("click", ...arguments);
868
+ }
869
+ screencast(opts, page) {
870
+ return this.send(
871
+ "screencast",
872
+ {
873
+ ...opts,
874
+ path: this.testResourceConfiguration.fs + "/" + opts.path
875
+ },
876
+ page,
877
+ this.testResourceConfiguration.name
878
+ );
879
+ }
880
+ screencastStop(p) {
881
+ return this.send("screencastStop", ...arguments);
882
+ }
883
+ customScreenShot(x, y) {
884
+ const opts = x[0];
885
+ const page = x[1];
886
+ return this.send(
887
+ "customScreenShot",
888
+ {
889
+ ...opts,
890
+ path: this.testResourceConfiguration.fs + "/" + opts.path
891
+ },
892
+ this.testResourceConfiguration.name,
893
+ page
894
+ );
895
+ }
896
+ async existsSync(destFolder) {
897
+ return await this.send(
898
+ "existsSync",
899
+ this.testResourceConfiguration.fs + "/" + destFolder
900
+ );
901
+ }
902
+ mkdirSync() {
903
+ return this.send("mkdirSync", this.testResourceConfiguration.fs + "/");
904
+ }
905
+ async write(uid, contents) {
906
+ return await this.send("write", ...arguments);
907
+ }
908
+ async writeFileSync(filepath, contents) {
909
+ return await this.send(
910
+ "writeFileSync",
911
+ this.testResourceConfiguration.fs + "/" + filepath,
912
+ contents,
913
+ this.testResourceConfiguration.name
914
+ );
915
+ }
916
+ async createWriteStream(filepath) {
917
+ return await this.send(
918
+ "createWriteStream",
919
+ this.testResourceConfiguration.fs + "/" + filepath,
920
+ this.testResourceConfiguration.name
921
+ );
922
+ }
923
+ async end(uid) {
924
+ return await this.send("end", ...arguments);
925
+ }
926
+ async customclose() {
927
+ return await this.send(
928
+ "customclose",
929
+ this.testResourceConfiguration.fs,
930
+ this.testResourceConfiguration.name
931
+ );
932
+ }
933
+ testArtiFactoryfileWriter(tLog, callback) {
934
+ return (fPath, value) => {
935
+ callback(
936
+ new Promise((res, rej) => {
937
+ tLog("testArtiFactory =>", fPath);
938
+ const cleanPath = path.resolve(fPath);
939
+ fPaths.push(cleanPath.replace(process.cwd(), ``));
940
+ const targetDir = cleanPath.split("/").slice(0, -1).join("/");
941
+ fs.mkdir(targetDir, { recursive: true }, async (error) => {
942
+ if (error) {
943
+ console.error(`\u2757\uFE0FtestArtiFactory failed`, targetDir, error);
944
+ }
945
+ fs.writeFileSync(
946
+ path.resolve(
947
+ targetDir.split("/").slice(0, -1).join("/"),
948
+ "manifest"
949
+ ),
950
+ fPaths.join(`
951
+ `),
952
+ {
953
+ encoding: "utf-8"
954
+ }
955
+ );
956
+ if (Buffer.isBuffer(value)) {
957
+ fs.writeFileSync(fPath, value, "binary");
958
+ res();
959
+ } else if (`string` === typeof value) {
960
+ fs.writeFileSync(fPath, value.toString(), {
961
+ encoding: "utf-8"
962
+ });
963
+ res();
964
+ } else {
965
+ const pipeStream = value;
966
+ const myFile = fs.createWriteStream(fPath);
967
+ pipeStream.pipe(myFile);
968
+ pipeStream.on("close", () => {
969
+ myFile.close();
970
+ res();
971
+ });
972
+ }
973
+ });
974
+ })
975
+ );
976
+ };
977
+ }
978
+ // launch(options?: PuppeteerLaunchOptions): Promise<Browser>;
979
+ startPuppeteer(options) {
980
+ }
981
+ };
982
+
983
+ // src/Node.ts
984
+ var ipcfile;
985
+ var NodeTesteranto = class extends Testeranto {
986
+ constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) {
987
+ super(
988
+ input,
989
+ testSpecification,
990
+ testImplementation,
991
+ testResourceRequirement,
992
+ testInterface,
993
+ () => {
994
+ }
995
+ );
996
+ }
997
+ async receiveTestResourceConfig(partialTestResource) {
998
+ const t = JSON.parse(partialTestResource);
999
+ const pm = new PM_Node(t, ipcfile);
1000
+ return await this.testJobs[0].receiveTestResourceConfig(pm);
1001
+ }
1002
+ };
1003
+ var testeranto = async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = defaultTestResourceRequirement) => {
1004
+ const t = new NodeTesteranto(
1005
+ input,
1006
+ testSpecification,
1007
+ testImplementation,
1008
+ testResourceRequirement,
1009
+ testInterface
1010
+ );
1011
+ process.on("unhandledRejection", (reason, promise) => {
1012
+ console.error("Unhandled Rejection at:", promise, "reason:", reason);
1013
+ });
1014
+ try {
1015
+ ipcfile = process.argv[3];
1016
+ const f = await t.receiveTestResourceConfig(process.argv[2]);
1017
+ console.error("goodbye node error", f.fails);
1018
+ process.exit(f.fails);
1019
+ } catch (e) {
1020
+ console.error("goodbye node error", e);
1021
+ process.exit(-1);
1022
+ }
1023
+ return t;
1024
+ };
1025
+ var Node_default = testeranto;
1026
+
1027
+ export {
1028
+ __require,
1029
+ __commonJS,
1030
+ __toESM,
1031
+ Node_default
1032
+ };