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
package/src/lib/core.ts CHANGED
@@ -1,13 +1,16 @@
1
1
  import { IStore } from "../SubPackages/react/jsx";
2
2
  import {
3
- IBaseTest,
4
3
  ITestSpecification,
5
4
  ITestImplementation,
5
+ ITestInterface,
6
+ Ibdd_in,
7
+ Ibdd_out,
6
8
  } from "../Types.js";
9
+ import { PM } from "../PM/index";
7
10
 
8
- import { IFinalResults, ITestInterface } from "./types.js";
9
11
  import {
10
12
  DefaultTestInterface,
13
+ IFinalResults,
11
14
  ITTestResourceRequest,
12
15
  ITestArtifactory,
13
16
  defaultTestResourceRequirement,
@@ -20,30 +23,31 @@ import {
20
23
  BaseCheck,
21
24
  } from "./abstractBase.js";
22
25
  import { ClassBuilder } from "./classBuilder.js";
23
- import { PM } from "../PM/index";
24
26
 
25
27
  export default abstract class Testeranto<
26
- ITestShape extends IBaseTest<
27
- unknown,
28
+ I extends Ibdd_in<
28
29
  unknown,
29
30
  unknown,
30
31
  unknown,
31
32
  unknown,
32
33
  unknown,
33
34
  unknown,
35
+ unknown
36
+ >,
37
+ O extends Ibdd_out<
34
38
  Record<string, any>,
35
39
  Record<string, any>,
36
40
  Record<string, any>,
37
41
  Record<string, any>,
38
42
  Record<string, any>
39
43
  >
40
- > extends ClassBuilder<ITestShape> {
44
+ > extends ClassBuilder<I, O> {
41
45
  constructor(
42
- input: ITestShape["iinput"],
43
- testSpecification: ITestSpecification<ITestShape>,
44
- testImplementation: ITestImplementation<ITestShape>,
46
+ input: I["iinput"],
47
+ testSpecification: ITestSpecification<I, O>,
48
+ testImplementation: ITestImplementation<I, O>,
45
49
  testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
46
- testInterface: Partial<ITestInterface<ITestShape>>,
50
+ testInterface: Partial<ITestInterface<I>>,
47
51
  uberCatcher: (cb) => void
48
52
  ) {
49
53
  const fullTestInterface = DefaultTestInterface(testInterface);
@@ -53,15 +57,15 @@ export default abstract class Testeranto<
53
57
  testSpecification,
54
58
  input,
55
59
 
56
- class extends BaseSuite<ITestShape> {
60
+ class extends BaseSuite<I, O> {
57
61
  afterAll(store: IStore, artifactory: ITestArtifactory, pm: PM) {
58
62
  return fullTestInterface.afterAll(
59
63
  store,
60
- (fPath: string, value: unknown) =>
61
- // TODO does not work?
62
- {
63
- artifactory(`afterAll4-${this.name}/${fPath}`, value);
64
- },
64
+ // (fPath: string, value: unknown) =>
65
+ // // TODO does not work?
66
+ // {
67
+ // artifactory(`afterAll4-${this.name}/${fPath}`, value);
68
+ // },
65
69
  pm
66
70
  );
67
71
  }
@@ -71,24 +75,29 @@ export default abstract class Testeranto<
71
75
  }
72
76
 
73
77
  async setup(
74
- s: ITestShape["iinput"],
78
+ s: I["iinput"],
75
79
  artifactory: ITestArtifactory,
76
80
  tr,
77
81
  pm
78
- ): Promise<ITestShape["isubject"]> {
82
+ ): Promise<I["isubject"]> {
79
83
  return (
80
84
  fullTestInterface.beforeAll ||
81
85
  (async (
82
- input: ITestShape["iinput"],
86
+ input: I["iinput"],
83
87
  artifactory: ITestArtifactory,
84
88
  tr,
85
89
  pm: PM
86
90
  ) => input as any)
87
- )(s, this.testResourceConfiguration, artifactory, pm);
91
+ )(
92
+ s,
93
+ this.testResourceConfiguration,
94
+ // artifactory,
95
+ pm
96
+ );
88
97
  }
89
98
  } as any,
90
99
 
91
- class Given extends BaseGiven<ITestShape> {
100
+ class Given extends BaseGiven<I> {
92
101
  uberCatcher = uberCatcher;
93
102
 
94
103
  async givenThat(
@@ -102,7 +111,7 @@ export default abstract class Testeranto<
102
111
  return fullTestInterface.beforeEach(
103
112
  subject,
104
113
  initializer,
105
- artifactory,
114
+ // artifactory,
106
115
  testResource,
107
116
  initialValues,
108
117
  pm
@@ -110,7 +119,7 @@ export default abstract class Testeranto<
110
119
  }
111
120
 
112
121
  afterEach(
113
- store: ITestShape["istore"],
122
+ store: I["istore"],
114
123
  key: string,
115
124
  artifactory,
116
125
  pm
@@ -120,8 +129,8 @@ export default abstract class Testeranto<
120
129
  fullTestInterface.afterEach(
121
130
  store,
122
131
  key,
123
- (fPath: string, value: unknown) =>
124
- artifactory(`after/${fPath}`, value),
132
+ // (fPath: string, value: unknown) =>
133
+ // artifactory(`after/${fPath}`, value),
125
134
  pm
126
135
  )
127
136
  )
@@ -129,7 +138,7 @@ export default abstract class Testeranto<
129
138
  }
130
139
  } as any,
131
140
 
132
- class When extends BaseWhen<ITestShape> {
141
+ class When extends BaseWhen<I> {
133
142
  async andWhen(store, whenCB, testResource, pm) {
134
143
  try {
135
144
  return await fullTestInterface.andWhen(
@@ -158,13 +167,13 @@ export default abstract class Testeranto<
158
167
  }
159
168
  } as any,
160
169
 
161
- class Then extends BaseThen<ITestShape> {
170
+ class Then extends BaseThen<I> {
162
171
  async butThen(
163
172
  store: any,
164
173
  thenCB,
165
174
  testResource: any,
166
175
  pm: PM
167
- ): Promise<ITestShape["iselection"]> {
176
+ ): Promise<I["iselection"]> {
168
177
  return await fullTestInterface
169
178
  .butThen(store, thenCB, testResource, pm)
170
179
  .then(
@@ -198,7 +207,7 @@ export default abstract class Testeranto<
198
207
  }
199
208
  } as any,
200
209
 
201
- class Check extends BaseCheck<ITestShape> {
210
+ class Check extends BaseCheck<I, O> {
202
211
  initialValues: any;
203
212
 
204
213
  constructor(
@@ -217,8 +226,8 @@ export default abstract class Testeranto<
217
226
  return fullTestInterface.beforeEach(
218
227
  subject,
219
228
  this.initialValues,
220
- (fPath: string, value: unknown) =>
221
- artifactory(`before/${fPath}`, value),
229
+ // (fPath: string, value: unknown) =>
230
+ // artifactory(`before/${fPath}`, value),
222
231
  testResourceConfiguration,
223
232
  this.initialValues,
224
233
  pm
@@ -226,7 +235,7 @@ export default abstract class Testeranto<
226
235
  }
227
236
 
228
237
  afterEach(
229
- store: ITestShape["istore"],
238
+ store: I["istore"],
230
239
  key: string,
231
240
  artifactory,
232
241
  pm
@@ -236,9 +245,9 @@ export default abstract class Testeranto<
236
245
  fullTestInterface.afterEach(
237
246
  store,
238
247
  key,
239
- (fPath: string, value: unknown) =>
240
- // TODO does not work?
241
- artifactory(`afterEach2-${this.name}/${fPath}`, value),
248
+ // (fPath: string, value: unknown) =>
249
+ // // TODO does not work?
250
+ // artifactory(`afterEach2-${this.name}/${fPath}`, value),
242
251
  pm
243
252
  )
244
253
  )
package/src/lib/index.ts CHANGED
@@ -1,32 +1,11 @@
1
+ import { IBaseTest } from "../../dist/types/src/Types.js";
1
2
  import { PM } from "../PM/index.js";
2
- import { IBaseTest } from "../Types.js";
3
+ import { Ibdd_in, Ibdd_out, ITestInterface } from "../Types.js";
3
4
 
4
- import {
5
- IGivens,
6
- BaseCheck,
7
- BaseSuite,
8
- BaseWhen,
9
- BaseThen,
10
- } from "./abstractBase.js";
11
- import { ITestInterface } from "./types.js";
12
-
13
- // import { INodeUtils, ITestInterface, IUtils, IWebUtils } from "./types.js";
5
+ import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
14
6
 
15
7
  export const BaseTestInterface: ITestInterface<
16
- IBaseTest<
17
- unknown,
18
- unknown,
19
- unknown,
20
- unknown,
21
- unknown,
22
- unknown,
23
- unknown,
24
- Record<string, any>,
25
- Record<string, any>,
26
- Record<string, any>,
27
- Record<string, any>,
28
- Record<string, any>
29
- >
8
+ Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>
30
9
  > = {
31
10
  beforeAll: async (s) => s,
32
11
  beforeEach: async function (
@@ -40,35 +19,25 @@ export const BaseTestInterface: ITestInterface<
40
19
  },
41
20
  afterEach: async (s) => s,
42
21
  afterAll: (
43
- store: IBaseTest<
44
- unknown,
22
+ store: Ibdd_in<
45
23
  unknown,
46
24
  unknown,
47
25
  unknown,
48
26
  unknown,
49
27
  unknown,
50
28
  unknown,
51
- Record<string, any>,
52
- Record<string, any>,
53
- Record<string, any>,
54
- Record<string, any>,
55
- Record<string, any>
29
+ unknown
56
30
  >["istore"]
57
31
  ) => undefined,
58
32
  butThen: async (
59
- store: IBaseTest<
60
- unknown,
33
+ store: Ibdd_in<
61
34
  unknown,
62
35
  unknown,
63
36
  unknown,
64
37
  unknown,
65
38
  unknown,
66
39
  unknown,
67
- Record<string, any>,
68
- Record<string, any>,
69
- Record<string, any>,
70
- Record<string, any>,
71
- Record<string, any>
40
+ unknown
72
41
  >["istore"],
73
42
  thenCb
74
43
  ) => thenCb(store),
@@ -120,30 +89,11 @@ type ITest = {
120
89
  toObj(): object;
121
90
  name: string;
122
91
  givens: IGivens<
123
- IBaseTest<
124
- unknown,
125
- unknown,
126
- unknown,
127
- unknown,
128
- unknown,
129
- unknown,
130
- unknown,
131
- Record<string, any>,
132
- Record<string, any>,
133
- Record<string, any>,
134
- Record<string, any>,
135
- Record<string, any>
136
- >
92
+ Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>
137
93
  >;
138
94
  checks: BaseCheck<
139
- IBaseTest<
140
- unknown,
141
- unknown,
142
- unknown,
143
- unknown,
144
- unknown,
145
- unknown,
146
- unknown,
95
+ Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>,
96
+ Ibdd_out<
147
97
  Record<string, any>,
148
98
  Record<string, any>,
149
99
  Record<string, any>,
@@ -162,14 +112,8 @@ export type ITestJob<T = PM> = {
162
112
  t: ITLog
163
113
  ) => Promise<
164
114
  BaseSuite<
165
- IBaseTest<
166
- unknown,
167
- unknown,
168
- unknown,
169
- unknown,
170
- unknown,
171
- unknown,
172
- unknown,
115
+ Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>,
116
+ Ibdd_out<
173
117
  Record<string, any>,
174
118
  Record<string, any>,
175
119
  Record<string, any>,
@@ -195,33 +139,38 @@ export const defaultTestResourceRequirement: ITTestResourceRequest = {
195
139
 
196
140
  export type ITestArtifactory = (key: string, value: unknown) => unknown;
197
141
 
198
- export type ITestCheckCallback<
199
- ITestShape extends IBaseTest<
200
- unknown,
201
- unknown,
202
- unknown,
203
- unknown,
204
- unknown,
205
- unknown,
206
- unknown,
207
- Record<string, any>,
208
- Record<string, any>,
209
- Record<string, any>,
210
- Record<string, any>,
211
- Record<string, any>
212
- >
213
- > = {
214
- [K in keyof ITestShape["checks"]]: (
215
- name: string,
216
- features: string[],
217
- callbackA: (
218
- whens: {
219
- [K in keyof ITestShape["whens"]]: (...unknown) => BaseWhen<ITestShape>;
220
- },
221
- thens: {
222
- [K in keyof ITestShape["thens"]]: (...unknown) => BaseThen<ITestShape>;
223
- }
224
- ) => Promise<any>,
225
- ...xtrasA: ITestShape["checks"][K]
226
- ) => BaseCheck<ITestShape>;
142
+ export type IRunnables = {
143
+ nodeEntryPoints: Record<string, string>;
144
+ webEntryPoints: Record<string, string>;
145
+ };
146
+
147
+ export type IFinalResults = { features: string[]; failed: number };
148
+
149
+ export type IRunTime = `node` | `web`;
150
+
151
+ export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
152
+
153
+ export type IPluginFactory = (
154
+ register: (entrypoint, sources) => any,
155
+ entrypoints
156
+ ) => Plugin;
157
+
158
+ export type IBaseConfig = {
159
+ src: string;
160
+ clearScreen: boolean;
161
+ debugger: boolean;
162
+ devMode: boolean;
163
+ externals: string[];
164
+ minify: boolean;
165
+ outbase: string;
166
+ outdir: string;
167
+ ports: string[];
168
+ tests: ITestTypes[];
169
+
170
+ nodePlugins: IPluginFactory[];
171
+ webPlugins: IPluginFactory[];
172
+
173
+ featureIngestor: (s: string) => Promise<string>;
227
174
  };
175
+
176
+ export type IBuiltConfig = { buildDir: string } & IBaseConfig;
@@ -0,0 +1,12 @@
1
+ # lib
2
+
3
+ This folder represents testeranto internals.
4
+
5
+ ## layers
6
+
7
+ Testeranto's core architecture is built in layers.
8
+
9
+ 0. abstractBase.ts - The lowest layer is composed of abstract BDD classes
10
+ 1. baseBuilder.ts - this layer extends the classes in `abstractBase` with the capacity to run and log tests.
11
+ 2. classBuilder.ts - this layer extends the classes in `baseBuilder` with the capacity to accept custom implementations of of abstract BDD classes in `abstractBase`
12
+ 3. core.ts - this layer extends the classes in `classBuilder` with the capacity to accept an input, a specification, a implementation a test resource requirement and an interface, and to map those entities to custom implementations of of abstract BDD classes in `abstractBase`.
package/src/lib/types.ts CHANGED
@@ -1,6 +1,5 @@
1
- // import { IBaseTest } from "../Types";
1
+ import { Ibdd_in, Ibdd_out } from "../Types";
2
2
 
3
- import type { Plugin } from "esbuild";
4
3
  import {
5
4
  IGivens,
6
5
  BaseCheck,
@@ -9,54 +8,51 @@ import {
9
8
  BaseWhen,
10
9
  BaseThen,
11
10
  } from "./abstractBase";
12
- import { IBaseTest } from "../Types";
13
11
 
14
- export type IFinalResults = { features: string[]; failed: number };
15
-
16
- export type IRunTime = `node` | `web`;
17
-
18
- export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
19
-
20
- export type IJsonConfig = {
21
- outdir: string;
22
- tests: ITestTypes[];
23
- botEmail: string;
24
- };
25
-
26
- export type IPlugin = (
27
- register: (entrypoint, sources) => any,
28
- entrypoints
29
- ) => Plugin;
30
-
31
- export type IBaseConfig = {
32
- src: string;
33
- clearScreen: boolean;
34
- debugger: boolean;
35
- devMode: boolean;
36
- externals: string[];
37
- minify: boolean;
38
- outbase: string;
39
- outdir: string;
40
- ports: string[];
41
- tests: ITestTypes[];
42
-
43
- nodePlugins: IPlugin[];
44
- webPlugins: IPlugin[];
45
-
46
- featureIngestor: (s: string) => Promise<string>;
12
+ export type ITestCheckCallback<
13
+ I extends Ibdd_in<
14
+ unknown,
15
+ unknown,
16
+ unknown,
17
+ unknown,
18
+ unknown,
19
+ unknown,
20
+ unknown
21
+ >,
22
+ O extends Ibdd_out<
23
+ Record<string, any>,
24
+ Record<string, any>,
25
+ Record<string, any>,
26
+ Record<string, any>,
27
+ Record<string, any>
28
+ >
29
+ > = {
30
+ [K in keyof O["checks"]]: (
31
+ name: string,
32
+ features: string[],
33
+ callbackA: (
34
+ whens: {
35
+ [K in keyof O["whens"]]: (...unknown) => BaseWhen<I>;
36
+ },
37
+ thens: {
38
+ [K in keyof O["thens"]]: (...unknown) => BaseThen<I>;
39
+ }
40
+ ) => Promise<any>,
41
+ ...xtrasA: O["checks"][K]
42
+ ) => BaseCheck<I, O>;
47
43
  };
48
44
 
49
- export type IBuiltConfig = { buildDir: string } & IBaseConfig;
50
-
51
45
  export type ISuiteKlasser<
52
- ITestShape extends IBaseTest<
53
- unknown,
46
+ I extends Ibdd_in<
54
47
  unknown,
55
48
  unknown,
56
49
  unknown,
57
50
  unknown,
58
51
  unknown,
59
52
  unknown,
53
+ unknown
54
+ >,
55
+ O extends Ibdd_out<
60
56
  Record<string, any>,
61
57
  Record<string, any>,
62
58
  Record<string, any>,
@@ -66,74 +62,61 @@ export type ISuiteKlasser<
66
62
  > = (
67
63
  name: string,
68
64
  index: number,
69
- givens: IGivens<ITestShape>,
70
- checks: BaseCheck<ITestShape>[]
71
- ) => BaseSuite<ITestShape>;
65
+ givens: IGivens<I>,
66
+ checks: BaseCheck<I, O>[]
67
+ ) => BaseSuite<I, O>;
72
68
 
73
69
  export type IGivenKlasser<
74
- ITestShape extends IBaseTest<
75
- unknown,
70
+ I extends Ibdd_in<
76
71
  unknown,
77
72
  unknown,
78
73
  unknown,
79
74
  unknown,
80
75
  unknown,
81
76
  unknown,
82
- Record<string, any>,
83
- Record<string, any>,
84
- Record<string, any>,
85
- Record<string, any>,
86
- Record<string, any>
77
+ unknown
87
78
  >
88
- > = (name, features, whens, thens, givenCB) => BaseGiven<ITestShape>;
79
+ > = (name, features, whens, thens, givenCB) => BaseGiven<I>;
89
80
 
90
81
  export type IWhenKlasser<
91
- ITestShape extends IBaseTest<
92
- unknown,
82
+ I extends Ibdd_in<
93
83
  unknown,
94
84
  unknown,
95
85
  unknown,
96
86
  unknown,
97
87
  unknown,
98
88
  unknown,
99
- Record<string, any>,
100
- Record<string, any>,
101
- Record<string, any>,
102
- Record<string, any>,
103
- Record<string, any>
89
+ unknown
104
90
  >
105
- > = (s, o) => BaseWhen<ITestShape>;
91
+ > = (s, o) => BaseWhen<I>;
106
92
 
107
93
  export type IThenKlasser<
108
- ITestShape extends IBaseTest<
94
+ I extends Ibdd_in<
109
95
  unknown,
110
96
  unknown,
111
97
  unknown,
112
98
  unknown,
113
99
  unknown,
114
100
  unknown,
115
- unknown,
116
- Record<string, any>,
117
- Record<string, any>,
118
- Record<string, any>,
119
- Record<string, any>,
120
- Record<string, any>
101
+ unknown
121
102
  >
122
- > = (s, o) => BaseThen<ITestShape>;
103
+ > = (s, o) => BaseThen<I>;
123
104
 
124
105
  export type ICheckKlasser<
125
- ITestShape extends IBaseTest<
126
- unknown,
106
+ I extends Ibdd_in<
127
107
  unknown,
128
108
  unknown,
129
109
  unknown,
130
110
  unknown,
131
111
  unknown,
132
112
  unknown,
113
+ unknown
114
+ >,
115
+ O extends Ibdd_out<
133
116
  Record<string, any>,
134
117
  Record<string, any>,
135
118
  Record<string, any>,
136
119
  Record<string, any>,
137
120
  Record<string, any>
138
121
  >
139
- > = (n, f, cb, w, t) => BaseCheck<ITestShape>;
122
+ > = (n, f, cb, w, t) => BaseCheck<I, O>;