testeranto 0.100.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 (285) hide show
  1. package/README.md +1 -0
  2. package/bundle.js +80 -30
  3. package/dist/common/{dist/module/src/Init.js → Init.js} +28 -0
  4. package/dist/common/{src/PM → PM}/main.js +138 -95
  5. package/dist/common/ReportServer.js +22 -0
  6. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/index.js +0 -12
  7. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  8. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  9. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +1 -1
  10. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +41 -30
  11. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +17 -7
  12. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +17 -7
  13. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +17 -7
  14. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +17 -7
  15. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +18 -14
  16. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +17 -7
  17. package/dist/common/build.js +222 -0
  18. package/dist/common/{src/defaultConfig.js → defaultConfig.js} +1 -0
  19. package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
  20. package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
  21. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/node.js +2 -10
  22. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/web.js +2 -13
  23. package/dist/common/{src/init-docs.js → init-docs.js} +20 -10
  24. package/dist/common/{src/lib → lib}/abstractBase.js +6 -1
  25. package/dist/common/{src/lib → lib}/basebuilder.js +23 -10
  26. package/dist/common/{src/lib → lib}/classBuilder.js +1 -3
  27. package/dist/common/{src/lib → lib}/core.js +26 -10
  28. package/dist/common/{src/lib → lib}/index.js +0 -1
  29. package/dist/common/{src/lib → lib}/types.js +0 -1
  30. package/dist/common/run.js +297 -0
  31. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  32. package/dist/common/utils.js +43 -0
  33. package/dist/module/Footer.js +4 -0
  34. package/dist/module/Init.js +63 -0
  35. package/dist/module/{src/PM → PM}/main.js +119 -86
  36. package/dist/module/ReportClient.js +97 -0
  37. package/dist/module/ReportServer.js +17 -0
  38. package/dist/module/SubPackages/react/jsx/index.js +15 -0
  39. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  40. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  41. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +3 -3
  42. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +24 -23
  43. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +1 -7
  44. package/dist/module/TestReport.js +91 -0
  45. package/dist/module/build.js +184 -0
  46. package/dist/module/{src/defaultConfig.js → defaultConfig.js} +1 -0
  47. package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
  48. package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
  49. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/node.js +2 -10
  50. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/web.js +2 -13
  51. package/dist/module/{src/init-docs.js → init-docs.js} +1 -1
  52. package/dist/module/{src/lib → lib}/abstractBase.js +6 -1
  53. package/dist/module/{src/lib → lib}/basebuilder.js +23 -10
  54. package/dist/module/{src/lib → lib}/classBuilder.js +1 -3
  55. package/dist/module/{src/lib → lib}/core.js +26 -10
  56. package/dist/module/{src/lib → lib}/index.js +0 -1
  57. package/dist/module/run.js +259 -0
  58. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  59. package/dist/module/utils.js +29 -0
  60. package/dist/prebuild/ReportClient.css +11367 -0
  61. package/dist/prebuild/ReportClient.js +23641 -0
  62. package/dist/prebuild/ReportServer.mjs +16 -0
  63. package/dist/prebuild/TestReport.css +11367 -0
  64. package/dist/prebuild/TestReport.js +27484 -0
  65. package/dist/prebuild/build.mjs +376 -0
  66. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
  67. package/dist/prebuild/init-docs.mjs +64 -8
  68. package/dist/prebuild/{cli2.mjs → run.mjs} +353 -81
  69. package/dist/tsconfig.tsbuildinfo +1 -0
  70. package/dist/types/Node.d.ts +12 -0
  71. package/dist/types/{src/PM → PM}/index.d.ts +1 -1
  72. package/dist/types/{src/PM → PM}/main.d.ts +12 -9
  73. package/dist/types/{src/PM → PM}/node.d.ts +2 -4
  74. package/dist/types/{src/PM → PM}/web.d.ts +2 -4
  75. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  76. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  77. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  78. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  79. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  80. package/dist/types/SubPackages/react-dom/component/node.d.ts +11 -0
  81. package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
  82. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  83. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
  84. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  85. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
  86. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  87. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
  88. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
  89. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  90. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +9 -0
  91. package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
  92. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
  93. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
  94. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  95. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
  96. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
  97. package/dist/types/Types.d.ts +61 -0
  98. package/dist/types/Web.d.ts +9 -0
  99. package/dist/types/defaultConfig.d.ts +3 -0
  100. package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
  101. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/index.d.ts +1 -1
  102. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/inputFilesPlugin.d.ts +0 -1
  103. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/node.d.ts +1 -1
  104. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/web.d.ts +1 -1
  105. package/dist/types/init-docs.d.ts +1 -0
  106. package/dist/types/lib/abstractBase.d.ts +110 -0
  107. package/dist/types/lib/basebuilder.d.ts +27 -0
  108. package/dist/types/lib/classBuilder.d.ts +7 -0
  109. package/dist/types/lib/core.d.ts +7 -0
  110. package/dist/types/lib/index.d.ts +83 -0
  111. package/dist/types/lib/types.d.ts +14 -0
  112. package/dist/types/run.d.ts +1 -0
  113. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  114. package/dist/types/utils.d.ts +9 -0
  115. package/package.json +40 -32
  116. package/src/Footer.tsx +4 -0
  117. package/src/Init.ts +48 -0
  118. package/src/Node.ts +23 -17
  119. package/src/PM/index.ts +1 -1
  120. package/src/PM/main.ts +143 -101
  121. package/src/PM/node.ts +2 -2
  122. package/src/PM/web.ts +1 -1
  123. package/src/ReportClient.tsx +155 -0
  124. package/src/ReportServer.ts +21 -0
  125. package/src/SubPackages/react/component/node.ts +68 -24
  126. package/src/SubPackages/react/component/web.ts +68 -25
  127. package/src/SubPackages/react/jsx/index.ts +39 -18
  128. package/src/SubPackages/react/jsx/node.ts +12 -10
  129. package/src/SubPackages/react/jsx/web.ts +27 -14
  130. package/src/SubPackages/react-dom/component/node.ts +42 -50
  131. package/src/SubPackages/react-dom/component/web.ts +28 -10
  132. package/src/SubPackages/react-dom/jsx/node.ts +54 -56
  133. package/src/SubPackages/react-dom/jsx/web.ts +55 -42
  134. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
  135. package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
  136. package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
  137. package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
  138. package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
  139. package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
  140. package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
  141. package/src/SubPackages/react-test-renderer/jsx/node.ts +8 -6
  142. package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
  143. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
  144. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
  145. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
  146. package/src/TestReport.tsx +176 -0
  147. package/src/Types.ts +63 -309
  148. package/src/Web.ts +24 -18
  149. package/src/build.ts +240 -0
  150. package/src/defaultConfig.ts +2 -1
  151. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
  152. package/src/esbuildConfigs/featuresPlugin.ts +0 -1
  153. package/src/esbuildConfigs/index.ts +1 -1
  154. package/src/esbuildConfigs/inputFilesPlugin.ts +2 -135
  155. package/src/esbuildConfigs/node.ts +4 -13
  156. package/src/esbuildConfigs/web.ts +3 -19
  157. package/src/init-docs.ts +2 -1
  158. package/src/lib/abstractBase.ts +82 -80
  159. package/src/lib/basebuilder.ts +57 -45
  160. package/src/lib/classBuilder.ts +15 -15
  161. package/src/lib/core.ts +44 -35
  162. package/src/lib/index.ts +47 -98
  163. package/src/lib/readme.md +12 -0
  164. package/src/lib/types.ts +53 -70
  165. package/src/run.ts +398 -0
  166. package/src/style.css +8 -0
  167. package/src/utils.ts +74 -2
  168. package/tsc.log +106 -0
  169. package/Bundle.Dockerfile +0 -52
  170. package/bin/init-docs.js +0 -24
  171. package/dist/common/src/Init.js +0 -40
  172. package/dist/common/src/SubPackages/puppeteer.js +0 -21
  173. package/dist/common/src/cli.js +0 -439
  174. package/dist/common/src/cli2.js +0 -144
  175. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -99
  176. package/dist/common/src/utils.js +0 -16
  177. package/dist/common/testeranto.js +0 -15
  178. package/dist/module/src/Init.js +0 -35
  179. package/dist/module/src/SubPackages/puppeteer.js +0 -16
  180. package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
  181. package/dist/module/src/cli.js +0 -411
  182. package/dist/module/src/cli2.js +0 -116
  183. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -94
  184. package/dist/module/src/lib/types.js +0 -2
  185. package/dist/module/src/utils.js +0 -9
  186. package/dist/module/testeranto.js +0 -13
  187. package/dist/prebuild/cli.mjs +0 -1491
  188. package/dist/types/dist/module/src/Init.d.ts +0 -2
  189. package/dist/types/src/Node.d.ts +0 -13
  190. package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
  191. package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
  192. package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
  193. package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
  194. package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
  195. package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
  196. package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
  197. package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
  198. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
  199. package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
  200. package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
  201. package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
  202. package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  203. package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
  204. package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
  205. package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  206. package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
  207. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
  208. package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
  209. package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
  210. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
  211. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
  212. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
  213. package/dist/types/src/Types.d.ts +0 -90
  214. package/dist/types/src/Web.d.ts +0 -10
  215. package/dist/types/src/defaultConfig.d.ts +0 -3
  216. package/dist/types/src/lib/abstractBase.d.ts +0 -110
  217. package/dist/types/src/lib/basebuilder.d.ts +0 -27
  218. package/dist/types/src/lib/classBuilder.d.ts +0 -7
  219. package/dist/types/src/lib/core.d.ts +0 -8
  220. package/dist/types/src/lib/index.d.ts +0 -60
  221. package/dist/types/src/lib/types.d.ts +0 -40
  222. package/dist/types/src/utils.d.ts +0 -2
  223. package/dist/types/testeranto.d.ts +0 -16
  224. package/docker-compose.yml +0 -37
  225. package/src/SubPackages/puppeteer.ts +0 -51
  226. package/src/cli.ts +0 -535
  227. package/src/cli2.ts +0 -157
  228. package/testeranto.ts +0 -13
  229. package/dist/common/{src/Node.js → Node.js} +0 -0
  230. package/dist/common/{src/PM → PM}/index.js +0 -0
  231. package/dist/common/{src/PM → PM}/node.js +0 -0
  232. package/dist/common/{src/PM → PM}/web.js +0 -0
  233. package/dist/common/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  234. package/dist/common/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  235. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/node.js +0 -0
  236. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  237. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  238. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  239. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  240. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  241. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  242. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  243. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  244. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  245. package/dist/common/{src/Types.js → Types.js} +0 -0
  246. package/dist/common/{src/Web.js → Web.js} +0 -0
  247. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  248. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  249. package/dist/common/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  250. package/dist/common/{src/web.html.js → web.html.js} +0 -0
  251. package/dist/module/{src/Node.js → Node.js} +0 -0
  252. package/dist/module/{src/PM → PM}/index.js +0 -0
  253. package/dist/module/{src/PM → PM}/node.js +0 -0
  254. package/dist/module/{src/PM → PM}/web.js +0 -0
  255. package/dist/module/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  256. package/dist/module/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  257. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/node.js +0 -0
  258. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  259. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  260. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
  261. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  262. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +0 -0
  263. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  264. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  265. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +0 -0
  266. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +0 -0
  267. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  268. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  269. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
  270. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  271. /package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  272. /package/dist/module/{src/Types.js → Types.js} +0 -0
  273. /package/dist/module/{src/Web.js → Web.js} +0 -0
  274. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  275. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  276. /package/dist/{types/src/cli.d.ts → module/lib/types.js} +0 -0
  277. /package/dist/module/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  278. /package/dist/module/{src/web.html.js → web.html.js} +0 -0
  279. /package/dist/types/{src/Init.d.ts → Init.d.ts} +0 -0
  280. /package/dist/types/{src/cli2.d.ts → ReportServer.d.ts} +0 -0
  281. /package/dist/types/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
  282. /package/dist/types/{src/init-docs.d.ts → build.d.ts} +0 -0
  283. /package/dist/types/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.d.ts +0 -0
  284. /package/dist/types/{src/puppeteerConfiger.d.ts → puppeteerConfiger.d.ts} +0 -0
  285. /package/dist/types/{src/web.html.d.ts → web.html.d.ts} +0 -0
@@ -1,34 +1,33 @@
1
- import { IBaseTest } from "../Types";
1
+ // import { IBaseTest } from "../Types";
2
2
  import { PM } from "../PM/index.js";
3
3
 
4
4
  import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
5
+ import { IBaseTest } from "../../dist/types/src/Types.js";
6
+ import { Ibdd_in, Ibdd_out } from "../Types.js";
5
7
 
6
8
  export type IGivens<
7
- ITestShape extends IBaseTest<
9
+ I extends Ibdd_in<
8
10
  unknown,
9
11
  unknown,
10
12
  unknown,
11
13
  unknown,
12
14
  unknown,
13
15
  unknown,
14
- unknown,
15
- Record<string, any>,
16
- Record<string, any>,
17
- Record<string, any>,
18
- Record<string, any>,
19
- Record<string, any>
16
+ unknown
20
17
  >
21
- > = Record<string, BaseGiven<ITestShape>>;
18
+ > = Record<string, BaseGiven<I>>;
22
19
 
23
20
  export abstract class BaseSuite<
24
- ITestShape extends IBaseTest<
25
- unknown,
21
+ I extends Ibdd_in<
26
22
  unknown,
27
23
  unknown,
28
24
  unknown,
29
25
  unknown,
30
26
  unknown,
31
27
  unknown,
28
+ unknown
29
+ >,
30
+ O extends Ibdd_out<
32
31
  Record<string, any>,
33
32
  Record<string, any>,
34
33
  Record<string, any>,
@@ -37,18 +36,18 @@ export abstract class BaseSuite<
37
36
  >
38
37
  > {
39
38
  name: string;
40
- givens: IGivens<ITestShape>;
41
- checks: BaseCheck<ITestShape>[];
42
- store: ITestShape["istore"];
43
- fails: BaseGiven<ITestShape>[];
39
+ givens: IGivens<I>;
40
+ checks: BaseCheck<I, O>[];
41
+ store: I["istore"];
42
+ fails: BaseGiven<I>[];
44
43
  testResourceConfiguration: ITTestResourceConfiguration;
45
44
  index: number;
46
45
 
47
46
  constructor(
48
47
  name: string,
49
48
  index: number,
50
- givens: IGivens<ITestShape> = {},
51
- checks: BaseCheck<ITestShape>[] = []
49
+ givens: IGivens<I> = {},
50
+ checks: BaseCheck<I, O>[] = []
52
51
  ) {
53
52
  this.name = name;
54
53
  this.index = index;
@@ -83,29 +82,29 @@ export abstract class BaseSuite<
83
82
  }
84
83
 
85
84
  setup(
86
- s: ITestShape["iinput"],
85
+ s: I["iinput"],
87
86
  artifactory: ITestArtifactory,
88
87
  tr: ITTestResourceConfiguration,
89
88
  pm: PM
90
- ): Promise<ITestShape["isubject"]> {
91
- return new Promise((res) => res(s as unknown as ITestShape["isubject"]));
89
+ ): Promise<I["isubject"]> {
90
+ return new Promise((res) => res(s as unknown as I["isubject"]));
92
91
  }
93
92
 
94
- assertThat(t: ITestShape["then"]): unknown {
93
+ assertThat(t: I["then"]): unknown {
95
94
  return t;
96
95
  }
97
96
 
98
- afterAll(store: ITestShape["istore"], artifactory: ITestArtifactory, pm: PM) {
97
+ afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: PM) {
99
98
  return store;
100
99
  }
101
100
 
102
101
  async run(
103
- input: ITestShape["iinput"],
102
+ input: I["iinput"],
104
103
  testResourceConfiguration: ITTestResourceConfiguration,
105
104
  artifactory: (fPath: string, value: unknown) => void,
106
105
  tLog: (...string) => void,
107
106
  pm: PM
108
- ): Promise<BaseSuite<ITestShape>> {
107
+ ): Promise<BaseSuite<I, O>> {
109
108
  this.testResourceConfiguration = testResourceConfiguration;
110
109
  tLog("test resources: ", JSON.stringify(testResourceConfiguration));
111
110
 
@@ -138,6 +137,7 @@ export abstract class BaseSuite<
138
137
  target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
139
138
  }
140
139
 
140
+ /* @ts-ignore:next-line */
141
141
  return Reflect.get(...arguments);
142
142
  },
143
143
  });
@@ -212,39 +212,34 @@ export abstract class BaseSuite<
212
212
  }
213
213
 
214
214
  export abstract class BaseGiven<
215
- ITestShape extends IBaseTest<
215
+ I extends Ibdd_in<
216
216
  unknown,
217
217
  unknown,
218
218
  unknown,
219
219
  unknown,
220
220
  unknown,
221
221
  unknown,
222
- unknown,
223
- Record<string, any>,
224
- Record<string, any>,
225
- Record<string, any>,
226
- Record<string, any>,
227
- Record<string, any>
222
+ unknown
228
223
  >
229
224
  > {
230
225
  name: string;
231
226
  features: string[];
232
- whens: BaseWhen<ITestShape>[];
233
- thens: BaseThen<ITestShape>[];
227
+ whens: BaseWhen<I>[];
228
+ thens: BaseThen<I>[];
234
229
  error: Error;
235
230
  fail: any;
236
- store: ITestShape["istore"];
231
+ store: I["istore"];
237
232
  recommendedFsPath: string;
238
- givenCB: ITestShape["given"];
233
+ givenCB: I["given"];
239
234
  initialValues: any;
240
235
  key: string;
241
236
 
242
237
  constructor(
243
238
  name: string,
244
239
  features: string[],
245
- whens: BaseWhen<ITestShape>[],
246
- thens: BaseThen<ITestShape>[],
247
- givenCB: ITestShape["given"],
240
+ whens: BaseWhen<I>[],
241
+ thens: BaseThen<I>[],
242
+ givenCB: I["given"],
248
243
  initialValues: any
249
244
  // key: string
250
245
  ) {
@@ -257,7 +252,7 @@ export abstract class BaseGiven<
257
252
  }
258
253
 
259
254
  beforeAll(
260
- store: ITestShape["istore"],
255
+ store: I["istore"],
261
256
  // artifactory: ITestArtifactory
262
257
  // subject,
263
258
  initializer,
@@ -282,16 +277,16 @@ export abstract class BaseGiven<
282
277
  }
283
278
 
284
279
  abstract givenThat(
285
- subject: ITestShape["isubject"],
280
+ subject: I["isubject"],
286
281
  testResourceConfiguration,
287
282
  artifactory: ITestArtifactory,
288
- givenCB: ITestShape["given"],
283
+ givenCB: I["given"],
289
284
  initialValues: any,
290
285
  pm: PM
291
- ): Promise<ITestShape["istore"]>;
286
+ ): Promise<I["istore"]>;
292
287
 
293
288
  async afterEach(
294
- store: ITestShape["istore"],
289
+ store: I["istore"],
295
290
  key: string,
296
291
  artifactory: ITestArtifactory,
297
292
  pm: PM
@@ -302,10 +297,10 @@ export abstract class BaseGiven<
302
297
  abstract uberCatcher(e);
303
298
 
304
299
  async give(
305
- subject: ITestShape["isubject"],
300
+ subject: I["isubject"],
306
301
  key: string,
307
302
  testResourceConfiguration: ITTestResourceConfiguration,
308
- tester: (t: Awaited<ITestShape["then"]> | undefined) => boolean,
303
+ tester: (t: Awaited<I["then"]> | undefined) => boolean,
309
304
  artifactory: ITestArtifactory,
310
305
  tLog: ITLog,
311
306
  pm: PM,
@@ -353,6 +348,7 @@ export abstract class BaseGiven<
353
348
  );
354
349
  }
355
350
 
351
+ /* @ts-ignore:next-line */
356
352
  return Reflect.get(...arguments);
357
353
  },
358
354
  });
@@ -422,6 +418,7 @@ export abstract class BaseGiven<
422
418
  );
423
419
  }
424
420
 
421
+ /* @ts-ignore:next-line */
425
422
  return Reflect.get(...arguments);
426
423
  },
427
424
  });
@@ -441,22 +438,29 @@ export abstract class BaseGiven<
441
438
  }
442
439
  }
443
440
 
444
- export abstract class BaseWhen<ITestShape extends IBaseTest> {
441
+ export abstract class BaseWhen<
442
+ I extends Ibdd_in<
443
+ unknown,
444
+ unknown,
445
+ unknown,
446
+ unknown,
447
+ unknown,
448
+ unknown,
449
+ unknown
450
+ >
451
+ > {
445
452
  public name: string;
446
- whenCB: (x: ITestShape["iselection"]) => ITestShape["then"];
453
+ whenCB: (x: I["iselection"]) => I["then"];
447
454
  error: boolean;
448
455
 
449
- constructor(
450
- name: string,
451
- whenCB: (xyz: ITestShape["iselection"]) => ITestShape["then"]
452
- ) {
456
+ constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]) {
453
457
  this.name = name;
454
458
  this.whenCB = whenCB;
455
459
  }
456
460
 
457
461
  abstract andWhen(
458
- store: ITestShape["istore"],
459
- whenCB: (x: ITestShape["iselection"]) => ITestShape["then"],
462
+ store: I["istore"],
463
+ whenCB: (x: I["iselection"]) => I["then"],
460
464
  testResource,
461
465
  pm: PM
462
466
  ): Promise<any>;
@@ -469,7 +473,7 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
469
473
  }
470
474
 
471
475
  async test(
472
- store: ITestShape["istore"],
476
+ store: I["istore"],
473
477
  testResourceConfiguration,
474
478
  tLog: ITLog,
475
479
  pm: PM,
@@ -495,6 +499,7 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
495
499
  target[prop](`${filepath}/andWhen/${fp}`, contents);
496
500
  }
497
501
 
502
+ /* @ts-ignore:next-line */
498
503
  return Reflect.get(...arguments);
499
504
  },
500
505
  });
@@ -523,29 +528,21 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
523
528
  }
524
529
 
525
530
  export abstract class BaseThen<
526
- ITestShape extends IBaseTest<
527
- unknown,
531
+ I extends Ibdd_in<
528
532
  unknown,
529
533
  unknown,
530
534
  unknown,
531
535
  unknown,
532
536
  unknown,
533
537
  unknown,
534
- Record<string, any>,
535
- Record<string, any>,
536
- Record<string, any>,
537
- Record<string, any>,
538
- Record<string, any>
538
+ unknown
539
539
  >
540
540
  > {
541
541
  public name: string;
542
- thenCB: (storeState: ITestShape["iselection"]) => ITestShape["then"];
542
+ thenCB: (storeState: I["iselection"]) => I["then"];
543
543
  error: boolean;
544
544
 
545
- constructor(
546
- name: string,
547
- thenCB: (val: ITestShape["iselection"]) => ITestShape["then"]
548
- ) {
545
+ constructor(name: string, thenCB: (val: I["iselection"]) => I["then"]) {
549
546
  this.name = name;
550
547
  this.thenCB = thenCB;
551
548
  this.error = false;
@@ -559,19 +556,19 @@ export abstract class BaseThen<
559
556
  }
560
557
 
561
558
  abstract butThen(
562
- store: ITestShape["istore"],
559
+ store: I["istore"],
563
560
  thenCB,
564
561
  testResourceConfiguration: ITTestResourceConfiguration,
565
562
  pm: PM
566
- ): Promise<ITestShape["iselection"]>;
563
+ ): Promise<I["iselection"]>;
567
564
 
568
565
  async test(
569
- store: ITestShape["istore"],
566
+ store: I["istore"],
570
567
  testResourceConfiguration,
571
568
  tLog: ITLog,
572
569
  pm: PM,
573
570
  filepath: string
574
- ): Promise<ITestShape["then"] | undefined> {
571
+ ): Promise<I["then"] | undefined> {
575
572
  tLog(" Then:", this.name);
576
573
  try {
577
574
  const butThenProxy = new Proxy(pm, {
@@ -592,6 +589,7 @@ export abstract class BaseThen<
592
589
  target[prop](`${filepath}/${fp}`, contents);
593
590
  }
594
591
 
592
+ /* @ts-ignore:next-line */
595
593
  return Reflect.get(...arguments);
596
594
  },
597
595
  });
@@ -614,14 +612,16 @@ export abstract class BaseThen<
614
612
  }
615
613
 
616
614
  export abstract class BaseCheck<
617
- ITestShape extends IBaseTest<
618
- unknown,
615
+ I extends Ibdd_in<
619
616
  unknown,
620
617
  unknown,
621
618
  unknown,
622
619
  unknown,
623
620
  unknown,
624
621
  unknown,
622
+ unknown
623
+ >,
624
+ O extends Ibdd_out<
625
625
  Record<string, any>,
626
626
  Record<string, any>,
627
627
  Record<string, any>,
@@ -633,10 +633,10 @@ export abstract class BaseCheck<
633
633
  features: string[];
634
634
  checkCB: (whens, thens) => any;
635
635
  whens: {
636
- [K in keyof ITestShape["whens"]]: (p, tc) => BaseWhen<ITestShape>;
636
+ [K in keyof O["whens"]]: (p, tc) => BaseWhen<I>;
637
637
  };
638
638
  thens: {
639
- [K in keyof ITestShape["thens"]]: (p, tc) => BaseThen<ITestShape>;
639
+ [K in keyof O["thens"]]: (p, tc) => BaseThen<I>;
640
640
  };
641
641
 
642
642
  constructor(
@@ -654,13 +654,14 @@ export abstract class BaseCheck<
654
654
  }
655
655
 
656
656
  abstract checkThat(
657
- subject: ITestShape["isubject"],
657
+ subject: I["isubject"],
658
658
  testResourceConfiguration,
659
- artifactory: ITestArtifactory
660
- ): Promise<ITestShape["istore"]>;
659
+ artifactory: ITestArtifactory,
660
+ pm: PM
661
+ ): Promise<I["istore"]>;
661
662
 
662
663
  async afterEach(
663
- store: ITestShape["istore"],
664
+ store: I["istore"],
664
665
  key: string,
665
666
  cb,
666
667
  pm: PM
@@ -669,7 +670,7 @@ export abstract class BaseCheck<
669
670
  }
670
671
 
671
672
  async check(
672
- subject: ITestShape["isubject"],
673
+ subject: I["isubject"],
673
674
  key: string,
674
675
  testResourceConfiguration,
675
676
  tester,
@@ -681,7 +682,8 @@ export abstract class BaseCheck<
681
682
  const store = await this.checkThat(
682
683
  subject,
683
684
  testResourceConfiguration,
684
- artifactory
685
+ artifactory,
686
+ pm
685
687
  );
686
688
  await this.checkCB(
687
689
  Object.entries(this.whens).reduce((a, [key, when]) => {
@@ -1,7 +1,7 @@
1
1
  import { PassThrough } from "stream";
2
2
 
3
3
  import { ITTestResourceRequest, ITestJob, ITLog } from ".";
4
- import { IBaseTest, ITestSpecification } from "../Types.js";
4
+ import { Ibdd_in, Ibdd_out, ITestSpecification } from "../Types.js";
5
5
 
6
6
  import {
7
7
  ISuiteKlasser,
@@ -20,14 +20,16 @@ import {
20
20
  import { PM } from "../PM/index.js";
21
21
 
22
22
  export abstract class BaseBuilder<
23
- ITestShape extends IBaseTest<
24
- unknown,
23
+ I extends Ibdd_in<
25
24
  unknown,
26
25
  unknown,
27
26
  unknown,
28
27
  unknown,
29
28
  unknown,
30
29
  unknown,
30
+ unknown
31
+ >,
32
+ O extends Ibdd_out<
31
33
  Record<string, any>,
32
34
  Record<string, any>,
33
35
  Record<string, any>,
@@ -42,26 +44,26 @@ export abstract class BaseBuilder<
42
44
  > {
43
45
  specs: any;
44
46
 
45
- assertThis: (t: ITestShape["then"]) => {};
47
+ assertThis: (t: I["then"]) => {};
46
48
 
47
49
  testResourceRequirement: ITTestResourceRequest;
48
50
  artifacts: Promise<unknown>[] = [];
49
51
  testJobs: ITestJob[];
50
- testSpecification: ITestSpecification<ITestShape>;
51
- suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>;
52
- givenOverides: Record<keyof GivenExtensions, IGivenKlasser<ITestShape>>;
53
- whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>;
54
- thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>;
55
- checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>;
52
+ testSpecification: ITestSpecification<I, O>;
53
+ suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<I, O>>;
54
+ givenOverides: Record<keyof GivenExtensions, IGivenKlasser<I>>;
55
+ whenOverides: Record<keyof WhenExtensions, IWhenKlasser<I>>;
56
+ thenOverides: Record<keyof ThenExtensions, IThenKlasser<I>>;
57
+ checkOverides: Record<keyof CheckExtensions, ICheckKlasser<I, O>>;
56
58
  puppetMaster: PM;
57
59
 
58
60
  constructor(
59
- public readonly input: ITestShape["iinput"],
60
- suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>,
61
- givenOverides: Record<keyof GivenExtensions, IGivenKlasser<ITestShape>>,
62
- whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>,
63
- thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>,
64
- checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>,
61
+ public readonly input: I["iinput"],
62
+ suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<I, O>>,
63
+ givenOverides: Record<keyof GivenExtensions, IGivenKlasser<I>>,
64
+ whenOverides: Record<keyof WhenExtensions, IWhenKlasser<I>>,
65
+ thenOverides: Record<keyof ThenExtensions, IThenKlasser<I>>,
66
+ checkOverides: Record<keyof CheckExtensions, ICheckKlasser<I, O>>,
65
67
  testResourceRequirement: ITTestResourceRequest,
66
68
  testSpecification: any
67
69
  ) {
@@ -82,13 +84,10 @@ export abstract class BaseBuilder<
82
84
  this.Check()
83
85
  );
84
86
 
85
- this.testJobs = this.specs.map((suite: BaseSuite<ITestShape>) => {
87
+ this.testJobs = this.specs.map((suite: BaseSuite<I, O>) => {
86
88
  const suiteRunner =
87
- (suite: BaseSuite<ITestShape>) =>
88
- async (
89
- puppetMaster: PM,
90
- tLog: ITLog
91
- ): Promise<BaseSuite<ITestShape>> => {
89
+ (suite: BaseSuite<I, O>) =>
90
+ async (puppetMaster: PM, tLog: ITLog): Promise<BaseSuite<I, O>> => {
92
91
  const x = await suite.run(
93
92
  input,
94
93
  puppetMaster.testResourceConfiguration,
@@ -124,10 +123,7 @@ export abstract class BaseBuilder<
124
123
  puppetMaster.write(access, `${l.toString()}\n`);
125
124
  };
126
125
 
127
- const suiteDone: BaseSuite<ITestShape> = await runner(
128
- puppetMaster,
129
- tLog
130
- );
126
+ const suiteDone: BaseSuite<I, O> = await runner(puppetMaster, tLog);
131
127
 
132
128
  const logPromise = new Promise((res, rej) => {
133
129
  puppetMaster.end(access);
@@ -137,22 +133,41 @@ export abstract class BaseBuilder<
137
133
  const numberOfFailures = Object.keys(suiteDone.givens).filter((k) => {
138
134
  return suiteDone.givens[k].error;
139
135
  }).length;
140
- puppetMaster.writeFileSync(`exitcode`, numberOfFailures.toString());
136
+ puppetMaster.writeFileSync(
137
+ `bdd_errors.txt`,
138
+ numberOfFailures.toString()
139
+ );
141
140
 
142
- // if (numberOfFailures > 0) {
143
- // puppetMaster.writeFileSync(
144
- // `prompt`,
145
- // `
146
- // aider --message "make a script that prints hello" hello.js
147
- // `
148
- // );
149
- // }
141
+ const o = this.toObj();
142
+ puppetMaster.writeFileSync(
143
+ `littleBoard.html`,
144
+ `
145
+ <!DOCTYPE html>
146
+ <html lang="en">
147
+
148
+ <head>
149
+ <meta name="description" content="Webpage description goes here" />
150
+ <meta charset="utf-8" />
151
+ <title>kokomoBay - testeranto</title>
152
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
153
+ <meta name="author" content="" />
154
+
155
+ <link rel="stylesheet" href="/kokomoBay/docs/TestReport.css" />
156
+ <script src="/kokomoBay/docs/TestReport.js"></script>
157
+
158
+ </head>
159
+
160
+ <body>
161
+ <h1>Test report</h1>
162
+ <div id="root"/>
163
+ </body>
164
+ `
165
+ );
150
166
 
151
167
  puppetMaster.writeFileSync(
152
168
  `tests.json`,
153
169
  JSON.stringify(this.toObj(), null, 2)
154
170
  );
155
- // console.log(`exiting gracefully with ${numberOfFailures} failures.`);
156
171
 
157
172
  return {
158
173
  failed: numberOfFailures,
@@ -177,27 +192,24 @@ export abstract class BaseBuilder<
177
192
  (
178
193
  name: string,
179
194
  features: string[],
180
- whens: BaseWhen<ITestShape>[],
181
- thens: BaseThen<ITestShape>[],
195
+ whens: BaseWhen<I>[],
196
+ thens: BaseThen<I>[],
182
197
  gcb
183
- ) => BaseGiven<ITestShape>
198
+ ) => BaseGiven<I>
184
199
  > {
185
200
  return this.givenOverides;
186
201
  }
187
202
 
188
203
  When(): Record<
189
204
  keyof WhenExtensions,
190
- (arg0: ITestShape["istore"], ...arg1: any) => BaseWhen<ITestShape>
205
+ (arg0: I["istore"], ...arg1: any) => BaseWhen<I>
191
206
  > {
192
207
  return this.whenOverides;
193
208
  }
194
209
 
195
210
  Then(): Record<
196
211
  keyof ThenExtensions,
197
- (
198
- selection: ITestShape["iselection"],
199
- expectation: any
200
- ) => BaseThen<ITestShape>
212
+ (selection: I["iselection"], expectation: any) => BaseThen<I>
201
213
  > {
202
214
  return this.thenOverides;
203
215
  }
@@ -210,7 +222,7 @@ export abstract class BaseBuilder<
210
222
  whens,
211
223
  thens,
212
224
  x
213
- ) => BaseCheck<ITestShape>
225
+ ) => BaseCheck<I, O>
214
226
  > {
215
227
  return this.checkOverides;
216
228
  }
@@ -1,11 +1,11 @@
1
1
  import {
2
- IBaseTest,
2
+ Ibdd_in,
3
+ Ibdd_out,
3
4
  ITestImplementation,
4
5
  ITestSpecification,
5
6
  } from "../Types.js";
6
7
 
7
8
  import { BaseBuilder } from "./basebuilder.js";
8
-
9
9
  import {
10
10
  ISuiteKlasser,
11
11
  IGivenKlasser,
@@ -13,34 +13,35 @@ import {
13
13
  IThenKlasser,
14
14
  ICheckKlasser,
15
15
  } from "./types.js";
16
- import { PM } from "../PM/index.js";
17
16
  import { ITTestResourceRequest } from "./index.js";
18
17
 
19
18
  export abstract class ClassBuilder<
20
- ITestShape extends IBaseTest<
21
- unknown,
19
+ I extends Ibdd_in<
22
20
  unknown,
23
21
  unknown,
24
22
  unknown,
25
23
  unknown,
26
24
  unknown,
27
25
  unknown,
26
+ unknown
27
+ >,
28
+ O extends Ibdd_out<
28
29
  Record<string, any>,
29
30
  Record<string, any>,
30
31
  Record<string, any>,
31
32
  Record<string, any>,
32
33
  Record<string, any>
33
34
  >
34
- > extends BaseBuilder<ITestShape, any, any, any, any, any> {
35
+ > extends BaseBuilder<I, O, any, any, any, any, any> {
35
36
  constructor(
36
- testImplementation: ITestImplementation<ITestShape, any>,
37
- testSpecification: ITestSpecification<ITestShape>,
38
- input: ITestShape["iinput"],
39
- suiteKlasser: ISuiteKlasser<ITestShape>,
40
- givenKlasser: IGivenKlasser<ITestShape>,
41
- whenKlasser: IWhenKlasser<ITestShape>,
42
- thenKlasser: IThenKlasser<ITestShape>,
43
- checkKlasser: ICheckKlasser<ITestShape>,
37
+ testImplementation: ITestImplementation<I, O>,
38
+ testSpecification: ITestSpecification<I, O>,
39
+ input: I["iinput"],
40
+ suiteKlasser: ISuiteKlasser<I, O>,
41
+ givenKlasser: IGivenKlasser<I>,
42
+ whenKlasser: IWhenKlasser<I>,
43
+ thenKlasser: IThenKlasser<I>,
44
+ checkKlasser: ICheckKlasser<I, O>,
44
45
  testResourceRequirement: ITTestResourceRequest
45
46
  ) {
46
47
  const classySuites = Object.entries(testImplementation.suites).reduce(
@@ -126,7 +127,6 @@ export abstract class ClassBuilder<
126
127
  classyChecks,
127
128
  testResourceRequirement,
128
129
  testSpecification
129
- // puppetMaster
130
130
  );
131
131
  }
132
132
  }