testeranto 0.94.0 → 0.110.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 (308) hide show
  1. package/README.md +1 -0
  2. package/bundle.js +80 -33
  3. package/dist/common/{src/Init.js → Init.js} +28 -0
  4. package/dist/common/{src/PM → PM}/main.js +272 -111
  5. package/dist/common/{src/PM → PM}/node.js +20 -5
  6. package/dist/common/{src/PM → PM}/web.js +19 -4
  7. package/dist/common/ReportServer.js +22 -0
  8. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/index.js +0 -12
  9. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
  10. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  11. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  12. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +1 -1
  13. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +41 -30
  14. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +17 -7
  15. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +17 -7
  16. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +17 -7
  17. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +17 -7
  18. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +18 -14
  19. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +17 -7
  20. package/dist/common/build.js +222 -0
  21. package/dist/common/{src/defaultConfig.js → defaultConfig.js} +1 -0
  22. package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
  23. package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
  24. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
  25. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
  26. package/dist/common/{src/init-docs.js → init-docs.js} +20 -10
  27. package/dist/common/{src/lib → lib}/abstractBase.js +20 -92
  28. package/dist/common/{src/lib → lib}/basebuilder.js +23 -10
  29. package/dist/common/{src/lib → lib}/classBuilder.js +1 -3
  30. package/dist/common/{src/lib → lib}/core.js +26 -10
  31. package/dist/common/{src/lib → lib}/index.js +0 -1
  32. package/dist/common/run.js +297 -0
  33. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  34. package/dist/common/utils.js +43 -0
  35. package/dist/module/Footer.js +4 -0
  36. package/dist/module/Init.js +63 -0
  37. package/dist/module/{src/PM → PM}/main.js +253 -102
  38. package/dist/module/{src/PM → PM}/node.js +20 -5
  39. package/dist/module/{src/PM → PM}/web.js +19 -4
  40. package/dist/module/ReportClient.js +97 -0
  41. package/dist/module/ReportServer.js +17 -0
  42. package/dist/module/SubPackages/react/jsx/index.js +15 -0
  43. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
  44. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  45. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  46. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +3 -3
  47. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +24 -23
  48. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +1 -7
  49. package/dist/module/TestReport.js +91 -0
  50. package/dist/module/build.js +184 -0
  51. package/dist/module/{src/defaultConfig.js → defaultConfig.js} +1 -0
  52. package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
  53. package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
  54. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
  55. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
  56. package/dist/module/{src/init-docs.js → init-docs.js} +1 -1
  57. package/dist/module/{src/lib → lib}/abstractBase.js +20 -92
  58. package/dist/module/{src/lib → lib}/basebuilder.js +23 -10
  59. package/dist/module/{src/lib → lib}/classBuilder.js +1 -3
  60. package/dist/module/{src/lib → lib}/core.js +26 -10
  61. package/dist/module/{src/lib → lib}/index.js +0 -1
  62. package/dist/module/run.js +259 -0
  63. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  64. package/dist/module/utils.js +29 -0
  65. package/dist/prebuild/ReportClient.css +11367 -0
  66. package/dist/prebuild/ReportClient.js +23641 -0
  67. package/dist/prebuild/ReportServer.mjs +16 -0
  68. package/dist/prebuild/TestReport.css +11367 -0
  69. package/dist/prebuild/TestReport.js +27484 -0
  70. package/dist/prebuild/build.mjs +376 -0
  71. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
  72. package/dist/prebuild/init-docs.mjs +64 -8
  73. package/dist/prebuild/{run-tests.mjs → run.mjs} +501 -182
  74. package/dist/tsconfig.tsbuildinfo +1 -0
  75. package/dist/types/Node.d.ts +12 -0
  76. package/dist/types/{src/PM → PM}/index.d.ts +11 -3
  77. package/dist/types/{src/PM → PM}/main.d.ts +24 -15
  78. package/dist/types/{src/PM → PM}/node.d.ts +11 -6
  79. package/dist/types/{src/PM → PM}/web.d.ts +11 -7
  80. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  81. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  82. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  83. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  84. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  85. package/dist/types/SubPackages/react-dom/component/node.d.ts +11 -0
  86. package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
  87. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  88. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
  89. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  90. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
  91. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  92. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
  93. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
  94. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  95. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +9 -0
  96. package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
  97. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
  98. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
  99. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  100. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
  101. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
  102. package/dist/types/Types.d.ts +61 -0
  103. package/dist/types/Web.d.ts +9 -0
  104. package/dist/types/defaultConfig.d.ts +3 -0
  105. package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
  106. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/index.d.ts +1 -1
  107. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/inputFilesPlugin.d.ts +0 -1
  108. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/node.d.ts +1 -1
  109. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/web.d.ts +1 -1
  110. package/dist/types/lib/abstractBase.d.ts +110 -0
  111. package/dist/types/lib/basebuilder.d.ts +27 -0
  112. package/dist/types/lib/classBuilder.d.ts +7 -0
  113. package/dist/types/lib/core.d.ts +7 -0
  114. package/dist/types/lib/index.d.ts +83 -0
  115. package/dist/types/lib/types.d.ts +14 -0
  116. package/dist/types/run.d.ts +1 -0
  117. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  118. package/dist/types/utils.d.ts +9 -0
  119. package/package.json +50 -39
  120. package/src/Footer.tsx +4 -0
  121. package/src/Init.ts +48 -0
  122. package/src/Node.ts +23 -17
  123. package/src/PM/index.ts +13 -9
  124. package/src/PM/main.ts +337 -139
  125. package/src/PM/node.ts +43 -8
  126. package/src/PM/web.ts +34 -6
  127. package/src/ReportClient.tsx +155 -0
  128. package/src/ReportServer.ts +21 -0
  129. package/src/SubPackages/react/component/node.ts +68 -24
  130. package/src/SubPackages/react/component/web.ts +68 -25
  131. package/src/SubPackages/react/jsx/index.ts +39 -18
  132. package/src/SubPackages/react/jsx/node.ts +23 -10
  133. package/src/SubPackages/react/jsx/web.ts +27 -14
  134. package/src/SubPackages/react-dom/component/node.ts +42 -50
  135. package/src/SubPackages/react-dom/component/web.ts +28 -10
  136. package/src/SubPackages/react-dom/jsx/node.ts +54 -56
  137. package/src/SubPackages/react-dom/jsx/web.ts +55 -42
  138. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
  139. package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
  140. package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
  141. package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
  142. package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
  143. package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
  144. package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
  145. package/src/SubPackages/react-test-renderer/jsx/node.ts +22 -5
  146. package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
  147. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
  148. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
  149. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
  150. package/src/TestReport.tsx +176 -0
  151. package/src/Types.ts +131 -129
  152. package/src/Web.ts +24 -18
  153. package/src/build.ts +240 -0
  154. package/src/defaultConfig.ts +2 -1
  155. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
  156. package/src/esbuildConfigs/featuresPlugin.ts +0 -1
  157. package/src/esbuildConfigs/index.ts +1 -1
  158. package/src/esbuildConfigs/inputFilesPlugin.ts +2 -114
  159. package/src/esbuildConfigs/node.ts +7 -19
  160. package/src/esbuildConfigs/web.ts +6 -21
  161. package/src/init-docs.ts +2 -1
  162. package/src/lib/abstractBase.ts +140 -195
  163. package/src/lib/basebuilder.ts +57 -45
  164. package/src/lib/classBuilder.ts +15 -15
  165. package/src/lib/core.ts +44 -35
  166. package/src/lib/index.ts +47 -98
  167. package/src/lib/readme.md +12 -0
  168. package/src/lib/types.ts +40 -231
  169. package/src/run.ts +398 -0
  170. package/src/style.css +8 -0
  171. package/src/utils.ts +74 -2
  172. package/tsc.log +106 -0
  173. package/Bundle.Dockerfile +0 -52
  174. package/bin/init-docs.js +0 -24
  175. package/dist/common/dist/module/src/Init.js +0 -40
  176. package/dist/common/src/Aider.js +0 -143
  177. package/dist/common/src/Project.js +0 -227
  178. package/dist/common/src/Puppeteer.js +0 -111
  179. package/dist/common/src/SubPackages/puppeteer.js +0 -21
  180. package/dist/common/src/build-tests.js +0 -39
  181. package/dist/common/src/esbuildConfigs/features.js +0 -14
  182. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -87
  183. package/dist/common/src/esbuildConfigs/report.js +0 -14
  184. package/dist/common/src/esbuildConfigs/tests.js +0 -13
  185. package/dist/common/src/run-tests.js +0 -39
  186. package/dist/common/src/utils.js +0 -16
  187. package/dist/common/testeranto.js +0 -15
  188. package/dist/module/src/Aider.js +0 -136
  189. package/dist/module/src/Init.js +0 -35
  190. package/dist/module/src/Project.js +0 -220
  191. package/dist/module/src/Puppeteer.js +0 -106
  192. package/dist/module/src/SubPackages/puppeteer.js +0 -16
  193. package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
  194. package/dist/module/src/build-tests.js +0 -11
  195. package/dist/module/src/esbuildConfigs/features.js +0 -12
  196. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -82
  197. package/dist/module/src/esbuildConfigs/report.js +0 -14
  198. package/dist/module/src/esbuildConfigs/tests.js +0 -11
  199. package/dist/module/src/run-tests.js +0 -11
  200. package/dist/module/src/utils.js +0 -9
  201. package/dist/module/testeranto.js +0 -13
  202. package/dist/prebuild/build-tests.mjs +0 -553
  203. package/dist/types/dist/module/src/Init.d.ts +0 -2
  204. package/dist/types/src/Aider.d.ts +0 -1
  205. package/dist/types/src/Node.d.ts +0 -13
  206. package/dist/types/src/Project.d.ts +0 -12
  207. package/dist/types/src/Puppeteer.d.ts +0 -2
  208. package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
  209. package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
  210. package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
  211. package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
  212. package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
  213. package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
  214. package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
  215. package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
  216. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
  217. package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
  218. package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
  219. package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
  220. package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  221. package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
  222. package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
  223. package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  224. package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
  225. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
  226. package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -8
  227. package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
  228. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
  229. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
  230. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
  231. package/dist/types/src/Types.d.ts +0 -51
  232. package/dist/types/src/Web.d.ts +0 -10
  233. package/dist/types/src/defaultConfig.d.ts +0 -3
  234. package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
  235. package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
  236. package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
  237. package/dist/types/src/lib/abstractBase.d.ts +0 -110
  238. package/dist/types/src/lib/basebuilder.d.ts +0 -27
  239. package/dist/types/src/lib/classBuilder.d.ts +0 -7
  240. package/dist/types/src/lib/core.d.ts +0 -8
  241. package/dist/types/src/lib/index.d.ts +0 -60
  242. package/dist/types/src/lib/types.d.ts +0 -68
  243. package/dist/types/src/utils.d.ts +0 -2
  244. package/dist/types/testeranto.d.ts +0 -16
  245. package/docker-compose.yml +0 -37
  246. package/src/Aider.ts +0 -168
  247. package/src/Project.ts +0 -292
  248. package/src/Puppeteer.ts +0 -143
  249. package/src/SubPackages/puppeteer.ts +0 -51
  250. package/src/build-tests.ts +0 -12
  251. package/src/esbuildConfigs/features.ts +0 -17
  252. package/src/esbuildConfigs/report.ts +0 -15
  253. package/src/esbuildConfigs/tests.ts +0 -14
  254. package/src/run-tests.ts +0 -12
  255. package/testeranto.ts +0 -13
  256. package/dist/common/{src/Node.js → Node.js} +0 -0
  257. package/dist/common/{src/PM → PM}/index.js +0 -0
  258. package/dist/common/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  259. package/dist/common/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  260. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  261. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  262. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  263. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  264. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  265. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  266. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  267. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  268. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  269. package/dist/common/{src/Types.js → Types.js} +0 -0
  270. package/dist/common/{src/Web.js → Web.js} +0 -0
  271. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  272. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  273. package/dist/common/{src/lib → lib}/types.js +0 -0
  274. package/dist/common/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  275. package/dist/common/{src/web.html.js → web.html.js} +0 -0
  276. package/dist/module/{src/Node.js → Node.js} +0 -0
  277. package/dist/module/{src/PM → PM}/index.js +0 -0
  278. package/dist/module/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  279. package/dist/module/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  280. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  281. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  282. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
  283. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  284. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +0 -0
  285. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  286. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  287. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +0 -0
  288. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +0 -0
  289. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  290. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  291. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
  292. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  293. /package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  294. /package/dist/module/{src/Types.js → Types.js} +0 -0
  295. /package/dist/module/{src/Web.js → Web.js} +0 -0
  296. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  297. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  298. /package/dist/module/{src/lib → lib}/types.js +0 -0
  299. /package/dist/module/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  300. /package/dist/module/{src/web.html.js → web.html.js} +0 -0
  301. /package/dist/types/{src/Init.d.ts → Init.d.ts} +0 -0
  302. /package/dist/types/{src/build-tests.d.ts → ReportServer.d.ts} +0 -0
  303. /package/dist/types/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
  304. /package/dist/types/{src/init-docs.d.ts → build.d.ts} +0 -0
  305. /package/dist/types/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.d.ts +0 -0
  306. /package/dist/types/{src/run-tests.d.ts → init-docs.d.ts} +0 -0
  307. /package/dist/types/{src/puppeteerConfiger.d.ts → puppeteerConfiger.d.ts} +0 -0
  308. /package/dist/types/{src/web.html.d.ts → web.html.d.ts} +0 -0
@@ -0,0 +1,222 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const fs_1 = __importDefault(require("fs"));
40
+ const path_1 = __importDefault(require("path"));
41
+ const readline_1 = __importDefault(require("readline"));
42
+ const glob_1 = require("glob");
43
+ const esbuild_1 = __importDefault(require("esbuild"));
44
+ const node_js_1 = __importDefault(require("./esbuildConfigs/node.js"));
45
+ const web_js_1 = __importDefault(require("./esbuildConfigs/web.js"));
46
+ const web_html_js_1 = __importDefault(require("./web.html.js"));
47
+ readline_1.default.emitKeypressEvents(process.stdin);
48
+ if (process.stdin.isTTY)
49
+ process.stdin.setRawMode(true);
50
+ const getRunnables = (tests, payload = {
51
+ nodeEntryPoints: {},
52
+ webEntryPoints: {},
53
+ }) => {
54
+ return tests.reduce((pt, cv, cndx, cry) => {
55
+ if (cv[1] === "node") {
56
+ pt.nodeEntryPoints[cv[0]] = path_1.default.resolve(`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
57
+ }
58
+ else if (cv[1] === "web") {
59
+ pt.webEntryPoints[cv[0]] = path_1.default.resolve(`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
60
+ }
61
+ if (cv[3].length) {
62
+ getRunnables(cv[3], payload);
63
+ }
64
+ return pt;
65
+ }, payload);
66
+ };
67
+ Promise.resolve(`${process.cwd() + "/" + process.argv[2]}`).then(s => __importStar(require(s))).then(async (module) => {
68
+ const rawConfig = module.default;
69
+ const getSecondaryEndpointsPoints = (runtime) => {
70
+ const meta = (ts, st) => {
71
+ ts.forEach((t) => {
72
+ if (t[1] === runtime) {
73
+ st.add(t[0]);
74
+ }
75
+ if (Array.isArray(t[3])) {
76
+ meta(t[3], st);
77
+ }
78
+ });
79
+ return st;
80
+ };
81
+ return Array.from(meta(config.tests, new Set()));
82
+ };
83
+ const config = Object.assign(Object.assign({}, rawConfig), { buildDir: process.cwd() + "/" + rawConfig.outdir });
84
+ let nodeDone = false;
85
+ let webDone = false;
86
+ let mode = config.devMode ? "DEV" : "PROD";
87
+ let status = "build";
88
+ // let pm: PM_Main | undefined = new PM_Main(config);
89
+ // const fileHashes = {};
90
+ const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
91
+ const onNodeDone = () => {
92
+ nodeDone = true;
93
+ onDone();
94
+ };
95
+ const onWebDone = () => {
96
+ webDone = true;
97
+ onDone();
98
+ };
99
+ const onDone = async () => {
100
+ if (nodeDone && webDone) {
101
+ status = "built";
102
+ }
103
+ if (nodeDone && webDone && status === "built") {
104
+ // Object.entries(nodeEntryPoints).forEach(([k, outputFile]) => {
105
+ // console.log("watching", outputFile);
106
+ // try {
107
+ // watch(outputFile, async (filename) => {
108
+ // const hash = await fileHash(outputFile);
109
+ // if (fileHashes[k] !== hash) {
110
+ // fileHashes[k] = hash;
111
+ // console.log(`< ${filename} `);
112
+ // pm.launchNode(k, outputFile);
113
+ // }
114
+ // });
115
+ // } catch (e) {
116
+ // console.error(e);
117
+ // }
118
+ // });
119
+ // Object.entries(webEntryPoints).forEach(([k, outputFile]) => {
120
+ // console.log("watching", outputFile);
121
+ // watch(outputFile, async (filename) => {
122
+ // const hash = await fileHash(outputFile);
123
+ // console.log(`< ${filename} ${hash}`);
124
+ // if (fileHashes[k] !== hash) {
125
+ // fileHashes[k] = hash;
126
+ // pm.launchWeb(k, outputFile);
127
+ // }
128
+ // });
129
+ // });
130
+ }
131
+ if (nodeDone && webDone && mode === "PROD") {
132
+ console.log("Testeranto-EsBuild is all done. Goodbye!");
133
+ process.exit();
134
+ }
135
+ else {
136
+ if (mode === "PROD") {
137
+ console.log("waiting for tests to finish");
138
+ console.log(JSON.stringify({
139
+ nodeDone: nodeDone,
140
+ webDone: webDone,
141
+ mode: mode,
142
+ }, null, 2));
143
+ }
144
+ else {
145
+ console.log("waiting for tests to change");
146
+ }
147
+ if (config.devMode) {
148
+ console.log("ready and watching for changes...");
149
+ }
150
+ else {
151
+ // pm.shutDown();
152
+ }
153
+ ////////////////////////////////////////////////////////////////////////////////
154
+ }
155
+ };
156
+ console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
157
+ process.stdin.on("keypress", (str, key) => {
158
+ if (key.name === "q") {
159
+ console.log("Testeranto-Build is shutting down...");
160
+ mode = "PROD";
161
+ onDone();
162
+ }
163
+ if (key.name === "x") {
164
+ console.log("Testeranto-Build is shutting down forcefully...");
165
+ process.exit(-1);
166
+ }
167
+ });
168
+ fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
169
+ Promise.resolve(Promise.all([...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
170
+ const sourceFileSplit = sourceFilePath.split("/");
171
+ const sourceDir = sourceFileSplit.slice(0, -1);
172
+ const sourceFileName = sourceFileSplit[sourceFileSplit.length - 1];
173
+ const sourceFileNameMinusJs = sourceFileName
174
+ .split(".")
175
+ .slice(0, -1)
176
+ .join(".");
177
+ const htmlFilePath = path_1.default.normalize(`${process.cwd()}/${config.outdir}/web/${sourceDir.join("/")}/${sourceFileNameMinusJs}.html`);
178
+ const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
179
+ return fs_1.default.promises
180
+ .mkdir(path_1.default.dirname(htmlFilePath), { recursive: true })
181
+ .then((x) => fs_1.default.writeFileSync(htmlFilePath, (0, web_html_js_1.default)(jsfilePath, htmlFilePath)));
182
+ })));
183
+ (0, glob_1.glob)(`./${config.outdir}/chunk-*.mjs`, {
184
+ ignore: "node_modules/**",
185
+ }).then((chunks) => {
186
+ chunks.forEach((chunk) => {
187
+ fs_1.default.unlinkSync(chunk);
188
+ });
189
+ });
190
+ await Promise.all([
191
+ esbuild_1.default
192
+ .context((0, node_js_1.default)(config, Object.keys(nodeEntryPoints)))
193
+ .then(async (nodeContext) => {
194
+ if (config.devMode) {
195
+ await nodeContext.watch().then((v) => {
196
+ onNodeDone();
197
+ });
198
+ }
199
+ else {
200
+ nodeContext.rebuild().then((v) => {
201
+ onNodeDone();
202
+ });
203
+ }
204
+ return nodeContext;
205
+ }),
206
+ esbuild_1.default
207
+ .context((0, web_js_1.default)(config, Object.keys(webEntryPoints)))
208
+ .then(async (webContext) => {
209
+ if (config.devMode) {
210
+ await webContext.watch().then((v) => {
211
+ onWebDone();
212
+ });
213
+ }
214
+ else {
215
+ webContext.rebuild().then((v) => {
216
+ onWebDone();
217
+ });
218
+ }
219
+ return webContext;
220
+ }),
221
+ ]);
222
+ });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config = {
4
+ src: "src",
4
5
  outdir: "docs",
5
6
  tests: [],
6
7
  debugger: true,
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ function default_1(results) {
5
+ return JSON.stringify(results, null, 2);
6
+ }
@@ -0,0 +1,27 @@
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 fs_1 = __importDefault(require("fs"));
7
+ const otherInputs = {};
8
+ const register = (entrypoint, sources) => {
9
+ if (!otherInputs[entrypoint]) {
10
+ otherInputs[entrypoint] = new Set();
11
+ }
12
+ sources.forEach((s) => otherInputs[entrypoint].add(s));
13
+ };
14
+ exports.default = (platform, entryPoints) => {
15
+ return {
16
+ register,
17
+ inputFilesPluginFactory: {
18
+ name: "metafileWriter",
19
+ setup(build) {
20
+ build.onEnd((result) => {
21
+ // console.log("build.onEnd", entryPoints);
22
+ fs_1.default.writeFileSync(`docs/${platform}/metafile.json`, JSON.stringify(result, null, 2));
23
+ });
24
+ },
25
+ },
26
+ };
27
+ };
@@ -8,8 +8,6 @@ const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
8
8
  const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
9
9
  exports.default = (config, entryPoints) => {
10
10
  const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", entryPoints);
11
- // const inputFilesPluginFactory = inputFilesPlugin("node", entryPoints);
12
- // const register = (x) => x;
13
11
  return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: config.outdir + "/node",
14
12
  // inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
15
13
  metafile: true, supported: {
@@ -18,24 +16,14 @@ exports.default = (config, entryPoints) => {
18
16
  "process.env.FLUENTFFMPEG_COV": "0",
19
17
  }, absWorkingDir: process.cwd(), banner: {
20
18
  js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
21
- }, platform: "node", external: [
22
- // "testeranto.json",
23
- // "features.test.js",
24
- "react",
25
- // "events",
26
- // "ganache"
27
- ...config.externals,
28
- ], entryPoints: [...entryPoints], plugins: [
19
+ }, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
29
20
  featuresPlugin_1.default,
30
- // markdownPlugin({}),
31
- ...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
32
21
  inputFilesPluginFactory,
33
- // inputFilesPlugin("node", entryPoints),
34
22
  {
35
23
  name: "rebuild-notify",
36
24
  setup(build) {
37
25
  build.onEnd((result) => {
38
- console.log(`node build ended with ${result.errors.length} errors`);
26
+ console.log(`> node build ended with ${result.errors.length} errors`);
39
27
  if (result.errors.length > 0) {
40
28
  console.log(result);
41
29
  }
@@ -44,5 +32,6 @@ exports.default = (config, entryPoints) => {
44
32
  });
45
33
  },
46
34
  },
35
+ ...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
47
36
  ] });
48
37
  };
@@ -9,19 +9,9 @@ const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
9
9
  const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
10
10
  exports.default = (config, entryPoints) => {
11
11
  const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web", entryPoints);
12
- return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), {
13
- // inject: ["./node_modules/testeranto/dist/cjs-shim.js"],
14
- // banner: {
15
- // js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
16
- // },
17
- // splitting: true,
18
- outdir: config.outdir + "/web", alias: {
12
+ return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir: config.outdir + "/web", alias: {
19
13
  react: path_1.default.resolve("./node_modules/react"),
20
14
  }, metafile: true, external: [
21
- // "testeranto.json",
22
- // "features.test.ts",
23
- // "url",
24
- // "react",
25
15
  "path",
26
16
  "fs",
27
17
  "stream",
@@ -41,14 +31,12 @@ exports.default = (config, entryPoints) => {
41
31
  "dns",
42
32
  ], platform: "browser", entryPoints: [...entryPoints], plugins: [
43
33
  featuresPlugin_js_1.default,
44
- // markdownPlugin({}),
45
- ...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
46
34
  inputFilesPluginFactory,
47
35
  {
48
36
  name: "rebuild-notify",
49
37
  setup(build) {
50
38
  build.onEnd((result) => {
51
- console.log(`web build ended with ${result.errors.length} errors`);
39
+ console.log(`> web build ended with ${result.errors.length} errors`);
52
40
  if (result.errors.length > 0) {
53
41
  console.log(result);
54
42
  }
@@ -57,5 +45,6 @@ exports.default = (config, entryPoints) => {
57
45
  });
58
46
  },
59
47
  },
48
+ ...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
60
49
  ] });
61
50
  };
@@ -15,29 +15,39 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  const fs_1 = __importDefault(require("fs"));
30
- const Init_1 = __importDefault(require("../dist/module/src/Init"));
40
+ const Init_1 = __importDefault(require("./Init"));
31
41
  console.log("Initializing a testeranto project");
32
42
  if (!process.argv[2]) {
33
43
  console.log("You didn't pass a config file, so I will create one for you.");
34
44
  fs_1.default.writeFileSync("testeranto.mts", fs_1.default.readFileSync("node_modules/testeranto/src/defaultConfig.ts"));
35
- Promise.resolve().then(() => __importStar(require(process.cwd() + "/" + "testeranto.mts"))).then((module) => {
45
+ Promise.resolve(`${process.cwd() + "/" + "testeranto.mts"}`).then(s => __importStar(require(s))).then((module) => {
36
46
  (0, Init_1.default)(module.default);
37
47
  });
38
48
  }
39
49
  else {
40
- Promise.resolve().then(() => __importStar(require(process.cwd() + "/" + process.argv[2]))).then((module) => {
50
+ Promise.resolve(`${process.cwd() + "/" + process.argv[2]}`).then(s => __importStar(require(s))).then((module) => {
41
51
  (0, Init_1.default)(module.default);
42
52
  });
43
53
  }
@@ -53,13 +53,14 @@ class BaseSuite {
53
53
  const beforeAllProxy = new Proxy(pm, {
54
54
  get(target, prop, receiver) {
55
55
  if (prop === "customScreenShot") {
56
- return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
56
+ return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
57
57
  // path: `${filepath}/${opts.path}`,
58
- path: `suite-${sNdx}/beforeAll/${opts.path}` }));
58
+ path: `suite-${sNdx}/beforeAll/${opts.path}` }), p);
59
59
  }
60
60
  if (prop === "writeFileSync") {
61
61
  return (fp, contents) => target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
62
62
  }
63
+ /* @ts-ignore:next-line */
63
64
  return Reflect.get(...arguments);
64
65
  },
65
66
  });
@@ -146,17 +147,21 @@ class BaseGiven {
146
147
  this.key = key;
147
148
  tLog(`\n ${this.key}`);
148
149
  tLog(`\n Given: ${this.name}`);
149
- const givenArtifactory = (fPath, value) => artifactory(`given-${this.key}/${fPath}`, value);
150
+ const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
150
151
  try {
151
152
  // tLog(`\n Given this.store`, this.store);
152
153
  const beforeEachProxy = new Proxy(pm, {
153
154
  get(target, prop, receiver) {
154
155
  if (prop === "writeFileSync") {
155
- return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${this.key}/when/beforeEach/${fp}`, contents);
156
+ return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`, contents);
156
157
  }
157
158
  if (prop === "customScreenShot") {
158
- return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${this.key}/when/beforeEach/${opts.path}` }));
159
+ return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
159
160
  }
161
+ if (prop === "screencast") {
162
+ return (opts, p) => target.screencast(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
163
+ }
164
+ /* @ts-ignore:next-line */
160
165
  return Reflect.get(...arguments);
161
166
  },
162
167
  });
@@ -167,10 +172,10 @@ class BaseGiven {
167
172
  });
168
173
  this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, beforeEachProxy);
169
174
  for (const [whenNdx, whenStep] of this.whens.entries()) {
170
- await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${this.key}/when/${whenNdx}`);
175
+ await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
171
176
  }
172
177
  for (const [thenNdx, thenStep] of this.thens.entries()) {
173
- const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${this.key}/then-${thenNdx}`);
178
+ const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
174
179
  tester(t);
175
180
  }
176
181
  }
@@ -186,11 +191,12 @@ class BaseGiven {
186
191
  const afterEachProxy = new Proxy(pm, {
187
192
  get(target, prop, receiver) {
188
193
  if (prop === "customScreenShot") {
189
- return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${this.key}/afterEach/${opts.path}` }));
194
+ return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/afterEach/${opts.path}` }), p);
190
195
  }
191
196
  if (prop === "writeFileSync") {
192
- return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${this.key}/afterEach/${fp}`, contents);
197
+ return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/afterEach/${fp}`, contents);
193
198
  }
199
+ /* @ts-ignore:next-line */
194
200
  return Reflect.get(...arguments);
195
201
  },
196
202
  });
@@ -223,91 +229,12 @@ class BaseWhen {
223
229
  const andWhenProxy = new Proxy(pm, {
224
230
  get(target, prop, receiver) {
225
231
  if (prop === "customScreenShot") {
226
- return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }));
232
+ return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }), p);
227
233
  }
228
234
  if (prop === "writeFileSync") {
229
235
  return (fp, contents) => target[prop](`${filepath}/andWhen/${fp}`, contents);
230
236
  }
231
- /////////////////////
232
- // if (prop === "browser") {
233
- // return new Proxy(target[prop], {
234
- // get(bTarget, bProp, bReceiver) {
235
- // if (bProp === "pages") {
236
- // return async () => {
237
- // return bTarget.pages().then((pages) => {
238
- // return pages.map((page) => {
239
- // return new Proxy(page, {
240
- // get(pTarget, pProp, pReciever) {
241
- // // console.log("mark get", pTarget, pProp, pReciever);
242
- // if (pProp === "screenshot") {
243
- // return async (x) => {
244
- // return pm.customScreenShot(
245
- // {
246
- // ...x,
247
- // path:
248
- // `${testResourceConfiguration.fs}/${key}/afterEach` +
249
- // "/" +
250
- // x.path,
251
- // },
252
- // page
253
- // );
254
- // };
255
- // } else if (pProp === "mainFrame") {
256
- // return () => pTarget[pProp]();
257
- // // return target[pProp];
258
- // // return Reflect.get(...arguments);
259
- // } else if (pProp === "exposeFunction") {
260
- // // return Reflect.get(target, prop, receiver);
261
- // return pTarget[pProp].bind(pTarget);
262
- // // return target[pProp];
263
- // } else if (pProp === "removeExposedFunction") {
264
- // // return Reflect.get(target, prop, receiver);
265
- // return pTarget[pProp].bind(pTarget);
266
- // // return target[pProp];
267
- // } else if (pProp === "click") {
268
- // // console.log("mark12", arguments);
269
- // // return Reflect.get(target, prop, receiver);
270
- // // return pTarget[pProp].bind(pTarget);
271
- // // return target[pProp];
272
- // return (selector, options) => {
273
- // pTarget[pProp](selector, options);
274
- // };
275
- // } else if (pProp === "$eval") {
276
- // // return pTarget[pProp].bind(pTarget);
277
- // return (selector, options) => {
278
- // pTarget[pProp](selector, options);
279
- // };
280
- // } else if (pProp === "$") {
281
- // return Reflect.get(...arguments);
282
- // // return Reflect.get(target, prop, receiver);
283
- // // return pTarget[pProp].bind(pTarget);
284
- // // return target[pProp];
285
- // // return pTarget[pProp].bind(pTarget);
286
- // // return async (s) => {
287
- // // console.log("mark17", s);
288
- // // console.log("pTarget", pTarget);
289
- // // console.log("pProp", pProp);
290
- // // console.log("pReciever", pReciever);
291
- // // // return "XXX";
292
- // // // debugger;
293
- // // return await pTarget[pProp](s);
294
- // // };
295
- // } else {
296
- // return Reflect.get(...arguments);
297
- // }
298
- // },
299
- // });
300
- // });
301
- // });
302
- // // return (await target.pages()).map((page) => {
303
- // // return new Proxy(page, handler2);
304
- // // });
305
- // };
306
- // }
307
- // },
308
- // });
309
- // }
310
- ///////////////////////
237
+ /* @ts-ignore:next-line */
311
238
  return Reflect.get(...arguments);
312
239
  },
313
240
  });
@@ -347,11 +274,12 @@ class BaseThen {
347
274
  const butThenProxy = new Proxy(pm, {
348
275
  get(target, prop, receiver) {
349
276
  if (prop === "customScreenShot") {
350
- return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }));
277
+ return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }), p);
351
278
  }
352
279
  if (prop === "writeFileSync") {
353
280
  return (fp, contents) => target[prop](`${filepath}/${fp}`, contents);
354
281
  }
282
+ /* @ts-ignore:next-line */
355
283
  return Reflect.get(...arguments);
356
284
  },
357
285
  });
@@ -381,7 +309,7 @@ class BaseCheck {
381
309
  }
382
310
  async check(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm) {
383
311
  tLog(`\n Check: ${this.name}`);
384
- const store = await this.checkThat(subject, testResourceConfiguration, artifactory);
312
+ const store = await this.checkThat(subject, testResourceConfiguration, artifactory, pm);
385
313
  await this.checkCB(Object.entries(this.whens).reduce((a, [key, when]) => {
386
314
  a[key] = async (payload) => {
387
315
  return await when(payload, testResourceConfiguration).test(store, testResourceConfiguration, tLog, pm, "x");
@@ -42,17 +42,30 @@ class BaseBuilder {
42
42
  const numberOfFailures = Object.keys(suiteDone.givens).filter((k) => {
43
43
  return suiteDone.givens[k].error;
44
44
  }).length;
45
- puppetMaster.writeFileSync(`exitcode`, numberOfFailures.toString());
46
- // if (numberOfFailures > 0) {
47
- // puppetMaster.writeFileSync(
48
- // `prompt`,
49
- // `
50
- // aider --message "make a script that prints hello" hello.js
51
- // `
52
- // );
53
- // }
45
+ puppetMaster.writeFileSync(`bdd_errors.txt`, numberOfFailures.toString());
46
+ const o = this.toObj();
47
+ puppetMaster.writeFileSync(`littleBoard.html`, `
48
+ <!DOCTYPE html>
49
+ <html lang="en">
50
+
51
+ <head>
52
+ <meta name="description" content="Webpage description goes here" />
53
+ <meta charset="utf-8" />
54
+ <title>kokomoBay - testeranto</title>
55
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
56
+ <meta name="author" content="" />
57
+
58
+ <link rel="stylesheet" href="/kokomoBay/docs/TestReport.css" />
59
+ <script src="/kokomoBay/docs/TestReport.js"></script>
60
+
61
+ </head>
62
+
63
+ <body>
64
+ <h1>Test report</h1>
65
+ <div id="root"/>
66
+ </body>
67
+ `);
54
68
  puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
55
- // console.log(`exiting gracefully with ${numberOfFailures} failures.`);
56
69
  return {
57
70
  failed: numberOfFailures,
58
71
  artifacts: this.artifacts || [],
@@ -34,9 +34,7 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
34
34
  };
35
35
  return a;
36
36
  }, {});
37
- super(input, classySuites, classyGivens, classyWhens, classyThens, classyChecks, testResourceRequirement, testSpecification
38
- // puppetMaster
39
- );
37
+ super(input, classySuites, classyGivens, classyWhens, classyThens, classyChecks, testResourceRequirement, testSpecification);
40
38
  }
41
39
  }
42
40
  exports.ClassBuilder = ClassBuilder;