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/Types.ts CHANGED
@@ -1,8 +1,4 @@
1
- import {
2
- ITTestResourceConfiguration,
3
- ITestArtificer,
4
- ITestCheckCallback,
5
- } from "./lib/index.js";
1
+ import { ITTestResourceConfiguration, ITestArtificer } from "./lib/index.js";
6
2
  import {
7
3
  IGivens,
8
4
  BaseCheck,
@@ -12,64 +8,9 @@ import {
12
8
  BaseGiven,
13
9
  } from "./lib/abstractBase.js";
14
10
  import { PM } from "./PM/index.js";
11
+ import { ITestCheckCallback } from "./lib/types.js";
15
12
 
16
- export type IWebTestInterface<
17
- ITestShape extends IBaseTest<
18
- unknown,
19
- unknown,
20
- unknown,
21
- unknown,
22
- unknown,
23
- unknown,
24
- unknown,
25
- Record<string, any>,
26
- Record<string, any>,
27
- Record<string, any>,
28
- Record<string, any>,
29
- Record<string, any>
30
- >
31
- > = {
32
- assertThis: (x: ITestShape["then"]) => void;
33
- andWhen: (
34
- store: ITestShape["istore"],
35
- whenCB: ITestShape["when"],
36
- testResource: ITTestResourceConfiguration,
37
- utils: PM
38
- ) => Promise<ITestShape["istore"]>;
39
- butThen: (
40
- store: ITestShape["istore"],
41
- thenCB,
42
- testResource: ITTestResourceConfiguration,
43
- utils: PM
44
- ) => Promise<ITestShape["iselection"]>;
45
- afterAll: (
46
- store: ITestShape["istore"],
47
- artificer: ITestArtificer,
48
- utils: PM
49
- ) => any;
50
- afterEach: (
51
- store: ITestShape["istore"],
52
- key: string,
53
- artificer: ITestArtificer,
54
- utils: PM
55
- ) => Promise<unknown>;
56
- beforeAll: (
57
- input: ITestShape["iinput"],
58
- testResource: ITTestResourceConfiguration,
59
- artificer: ITestArtificer,
60
- utils: PM
61
- ) => Promise<ITestShape["isubject"]>;
62
- beforeEach: (
63
- subject: ITestShape["isubject"],
64
- initializer: (c?) => ITestShape["given"],
65
- artificer: ITestArtificer,
66
- testResource: ITTestResourceConfiguration,
67
- initialValues,
68
- utils: PM
69
- ) => Promise<ITestShape["istore"]>;
70
- };
71
-
72
- export type INodeTestInterface<
13
+ export type ITestInterface<
73
14
  I extends Ibdd_in<
74
15
  unknown,
75
16
  unknown,
@@ -85,38 +26,31 @@ export type INodeTestInterface<
85
26
  store: I["istore"],
86
27
  whenCB: I["when"],
87
28
  testResource: ITTestResourceConfiguration,
88
- utils: PM
29
+ pm: PM
89
30
  ) => Promise<I["istore"]>;
90
31
  butThen: (
91
32
  store: I["istore"],
92
- thenCB,
33
+ thenCB: I["then"],
93
34
  testResource: ITTestResourceConfiguration,
94
- utils: PM
95
- ) => Promise<I["iselection"]>;
96
- afterAll: (store: I["istore"], artificer: ITestArtificer, pm: PM) => any;
97
- afterEach: (
98
- store: I["istore"],
99
- key: string,
100
- artificer: ITestArtificer,
101
35
  pm: PM
102
- ) => Promise<unknown>;
36
+ ) => Promise<I["iselection"]>;
37
+ afterAll: (store: I["istore"], pm: PM) => any;
38
+ afterEach: (store: I["istore"], key: string, pm: PM) => Promise<unknown>;
103
39
  beforeAll: (
104
40
  input: I["iinput"],
105
41
  testResource: ITTestResourceConfiguration,
106
- artificer: ITestArtificer,
107
42
  pm: PM
108
43
  ) => Promise<I["isubject"]>;
109
44
  beforeEach: (
110
45
  subject: I["isubject"],
111
46
  initializer: (c?) => I["given"],
112
- artificer: ITestArtificer,
113
47
  testResource: ITTestResourceConfiguration,
114
48
  initialValues,
115
49
  pm: PM
116
50
  ) => Promise<I["istore"]>;
117
51
  };
118
52
 
119
- export type ITestInterface<
53
+ export type IWebTestInterface<
120
54
  I extends Ibdd_in<
121
55
  unknown,
122
56
  unknown,
@@ -126,42 +60,19 @@ export type ITestInterface<
126
60
  unknown,
127
61
  unknown
128
62
  >
129
- > = {
130
- assertThis: (x: I["then"]) => void;
131
- andWhen: (
132
- store: I["istore"],
133
- whenCB: I["when"],
134
- testResource: ITTestResourceConfiguration,
135
- pm: PM
136
- ) => Promise<I["istore"]>;
137
- butThen: (
138
- store: I["istore"],
139
- thenCB: I["then"],
140
- testResource: ITTestResourceConfiguration,
141
- pm: PM
142
- ) => Promise<I["iselection"]>;
143
- afterAll: (store: I["istore"], artificer: ITestArtificer, pm: PM) => any;
144
- afterEach: (
145
- store: I["istore"],
146
- key: string,
147
- artificer: ITestArtificer,
148
- pm: PM
149
- ) => Promise<unknown>;
150
- beforeAll: (
151
- input: I["iinput"],
152
- testResource: ITTestResourceConfiguration,
153
- artificer: ITestArtificer,
154
- pm: PM
155
- ) => Promise<I["isubject"]>;
156
- beforeEach: (
157
- subject: I["isubject"],
158
- initializer: (c?) => I["given"],
159
- artificer: ITestArtificer,
160
- testResource: ITTestResourceConfiguration,
161
- initialValues,
162
- pm: PM
163
- ) => Promise<I["istore"]>;
164
- };
63
+ > = ITestInterface<I>;
64
+
65
+ export type INodeTestInterface<
66
+ I extends Ibdd_in<
67
+ unknown,
68
+ unknown,
69
+ unknown,
70
+ unknown,
71
+ unknown,
72
+ unknown,
73
+ unknown
74
+ >
75
+ > = ITestInterface<I>;
165
76
 
166
77
  export type IPartialInterface<
167
78
  I extends Ibdd_in<
@@ -187,24 +98,30 @@ export type IPartialNodeInterface<
187
98
  >
188
99
  > = Partial<INodeTestInterface<I>>;
189
100
  export type IPartialWebInterface<
190
- I extends IBaseTest<
191
- unknown,
101
+ I extends Ibdd_in<
192
102
  unknown,
193
103
  unknown,
194
104
  unknown,
195
105
  unknown,
196
106
  unknown,
197
107
  unknown,
198
- Record<string, any>,
199
- Record<string, any>,
200
- Record<string, any>,
201
- Record<string, any>,
202
- Record<string, any>
108
+ unknown
203
109
  >
204
110
  > = Partial<IWebTestInterface<I>>;
205
111
 
112
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////
113
+
206
114
  export type ITestSpecification<
207
- I extends Ibdd_out<
115
+ I extends Ibdd_in<
116
+ unknown,
117
+ unknown,
118
+ unknown,
119
+ unknown,
120
+ unknown,
121
+ unknown,
122
+ unknown
123
+ >,
124
+ O extends Ibdd_out<
208
125
  Record<string, any>,
209
126
  Record<string, any>,
210
127
  Record<string, any>,
@@ -213,170 +130,33 @@ export type ITestSpecification<
213
130
  >
214
131
  > = (
215
132
  Suite: {
216
- [K in keyof I["suites"]]: (
133
+ [K in keyof O["suites"]]: (
217
134
  name: string,
218
- givens: IGivens<
219
- IBaseTest<
220
- unknown,
221
- unknown,
222
- unknown,
223
- unknown,
224
- unknown,
225
- unknown,
226
- unknown,
227
- Record<string, any>,
228
- Record<string, any>,
229
- Record<string, any>,
230
- Record<string, any>,
231
- Record<string, any>
232
- >
233
- >,
234
- checks: BaseCheck<
235
- IBaseTest<
236
- unknown,
237
- unknown,
238
- unknown,
239
- unknown,
240
- unknown,
241
- unknown,
242
- unknown,
243
- Record<string, any>,
244
- Record<string, any>,
245
- Record<string, any>,
246
- Record<string, any>,
247
- Record<string, any>
248
- >
249
- >[]
250
- ) => BaseSuite<
251
- IBaseTest<
252
- unknown,
253
- unknown,
254
- unknown,
255
- unknown,
256
- unknown,
257
- unknown,
258
- unknown,
259
- Record<string, any>,
260
- Record<string, any>,
261
- Record<string, any>,
262
- Record<string, any>,
263
- Record<string, any>
264
- >
265
- >;
135
+ givens: IGivens<I>,
136
+ checks: BaseCheck<I, O>[]
137
+ ) => BaseSuite<I, O>;
266
138
  },
267
139
  Given: {
268
- [K in keyof I["givens"]]: (
140
+ [K in keyof O["givens"]]: (
269
141
  features: string[],
270
- whens: BaseWhen<
271
- IBaseTest<
272
- unknown,
273
- unknown,
274
- unknown,
275
- unknown,
276
- unknown,
277
- unknown,
278
- unknown,
279
- Record<string, any>,
280
- Record<string, any>,
281
- Record<string, any>,
282
- Record<string, any>,
283
- Record<string, any>
284
- >
285
- >[],
286
- thens: BaseThen<
287
- IBaseTest<
288
- unknown,
289
- unknown,
290
- unknown,
291
- unknown,
292
- unknown,
293
- unknown,
294
- unknown,
295
- Record<string, any>,
296
- Record<string, any>,
297
- Record<string, any>,
298
- Record<string, any>,
299
- Record<string, any>
300
- >
301
- >[],
302
- ...xtrasB: I["givens"][K]
303
- ) => BaseGiven<
304
- IBaseTest<
305
- unknown,
306
- unknown,
307
- unknown,
308
- unknown,
309
- unknown,
310
- unknown,
311
- unknown,
312
- Record<string, any>,
313
- Record<string, any>,
314
- Record<string, any>,
315
- Record<string, any>,
316
- Record<string, any>
317
- >
318
- >;
142
+ whens: BaseWhen<I>[],
143
+ thens: BaseThen<I>[],
144
+ ...xtrasB: O["givens"][K]
145
+ ) => BaseGiven<I>;
319
146
  },
320
147
  When: {
321
- [K in keyof I["whens"]]: (
322
- ...xtrasC: I["whens"][K]
323
- ) => BaseWhen<
324
- IBaseTest<
325
- unknown,
326
- unknown,
327
- unknown,
328
- unknown,
329
- unknown,
330
- unknown,
331
- unknown,
332
- Record<string, any>,
333
- Record<string, any>,
334
- Record<string, any>,
335
- Record<string, any>,
336
- Record<string, any>
337
- >
338
- >;
148
+ [K in keyof O["whens"]]: (...xtrasC: O["whens"][K]) => BaseWhen<I>;
339
149
  },
340
150
  Then: {
341
- [K in keyof I["thens"]]: (
342
- ...xtrasD: I["thens"][K]
343
- ) => BaseThen<
344
- IBaseTest<
345
- unknown,
346
- unknown,
347
- unknown,
348
- unknown,
349
- unknown,
350
- unknown,
351
- unknown,
352
- Record<string, any>,
353
- Record<string, any>,
354
- Record<string, any>,
355
- Record<string, any>,
356
- Record<string, any>
357
- >
358
- >;
151
+ [K in keyof O["thens"]]: (...xtrasD: O["thens"][K]) => BaseThen<I>;
359
152
  },
360
- Check: ITestCheckCallback<
361
- IBaseTest<
362
- unknown,
363
- unknown,
364
- unknown,
365
- unknown,
366
- unknown,
367
- unknown,
368
- unknown,
369
- Record<string, any>,
370
- Record<string, any>,
371
- Record<string, any>,
372
- Record<string, any>,
373
- Record<string, any>
374
- >
375
- >
153
+ Check: ITestCheckCallback<I, O>
376
154
  ) => any[];
377
155
 
156
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////
157
+
378
158
  export type ITestImplementation<
379
- IN extends Ibdd_in<
159
+ I extends Ibdd_in<
380
160
  unknown,
381
161
  unknown,
382
162
  unknown,
@@ -385,7 +165,7 @@ export type ITestImplementation<
385
165
  unknown,
386
166
  unknown
387
167
  >,
388
- OUT extends Ibdd_out<
168
+ O extends Ibdd_out<
389
169
  Record<string, any>,
390
170
  Record<string, any>,
391
171
  Record<string, any>,
@@ -394,55 +174,29 @@ export type ITestImplementation<
394
174
  >
395
175
  > = {
396
176
  suites: {
397
- [K in keyof OUT["suites"]]: string;
177
+ [K in keyof O["suites"]]: string;
398
178
  };
399
179
  givens: {
400
- [K in keyof OUT["givens"]]: (...Ig: OUT["givens"][K]) => IN["given"];
180
+ [K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
401
181
  };
402
182
  whens: {
403
- [K in keyof OUT["whens"]]: (
404
- ...Iw: OUT["whens"][K]
405
- ) => (zel: IN["iselection"], utils: PM) => Promise<IN["when"]>;
183
+ [K in keyof O["whens"]]: (
184
+ ...Iw: O["whens"][K]
185
+ ) => (zel: I["iselection"], utils: PM) => Promise<I["when"]>;
406
186
  };
407
187
  thens: {
408
- [K in keyof OUT["thens"]]: (
409
- ...It: OUT["thens"][K]
410
- ) => (ssel: IN["iselection"], utils: PM) => IN["then"];
188
+ [K in keyof O["thens"]]: (
189
+ ...It: O["thens"][K]
190
+ ) => (ssel: I["iselection"], utils: PM) => I["then"];
411
191
  };
412
192
  checks: {
413
- [K in keyof OUT["checks"]]: (...Ic: OUT["checks"][K]) => IN["given"];
193
+ [K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
414
194
  };
415
195
  };
416
196
 
417
- export type Modify<T, R> = Omit<T, keyof R> & R;
197
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
418
198
 
419
- export type IBaseTest<
420
- IInput,
421
- ISubject,
422
- IStore,
423
- ISelection,
424
- IGiven,
425
- IWhen,
426
- IThen,
427
- ISuites extends Record<string, any>,
428
- IGivens extends Record<string, any>,
429
- IWhens extends Record<string, any>,
430
- IThens extends Record<string, any>,
431
- IChecks extends Record<string, any>
432
- > = {
433
- iinput: IInput;
434
- isubject: ISubject;
435
- istore: IStore;
436
- iselection: ISelection;
437
- given: IGiven;
438
- when: IWhen;
439
- then: IThen;
440
- suites: ISuites;
441
- givens: IGivens;
442
- whens: IWhens;
443
- thens: IThens;
444
- checks: IChecks;
445
- };
199
+ export type Modify<T, R> = Omit<T, keyof R> & R;
446
200
 
447
201
  export type Ibdd_out<
448
202
  ISuites extends Record<string, any>,
package/src/Web.ts CHANGED
@@ -1,17 +1,19 @@
1
- import { error } from "console";
2
1
  import { PM_Web } from "./PM/web";
3
2
  import type {
4
- IBaseTest,
3
+ Ibdd_in,
4
+ Ibdd_out,
5
5
  ITestImplementation,
6
+ ITestInterface,
6
7
  ITestSpecification,
8
+ IWebTestInterface,
7
9
  } from "./Types";
8
10
  import Testeranto from "./lib/core.js";
9
11
  import {
12
+ IFinalResults,
10
13
  ITTestResourceConfiguration,
11
14
  ITTestResourceRequest,
12
15
  defaultTestResourceRequirement,
13
16
  } from "./lib/index.js";
14
- import { IFinalResults, ITestInterface, IWebTestInterface } from "./lib/types";
15
17
 
16
18
  let errorCallback = (e: any) => {};
17
19
  let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
@@ -21,27 +23,29 @@ let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
21
23
  };
22
24
 
23
25
  export class WebTesteranto<
24
- TestShape extends IBaseTest<
25
- unknown,
26
+ I extends Ibdd_in<
26
27
  unknown,
27
28
  unknown,
28
29
  unknown,
29
30
  unknown,
30
31
  unknown,
31
32
  unknown,
33
+ unknown
34
+ >,
35
+ O extends Ibdd_out<
32
36
  Record<string, any>,
33
37
  Record<string, any>,
34
38
  Record<string, any>,
35
39
  Record<string, any>,
36
40
  Record<string, any>
37
41
  >
38
- > extends Testeranto<TestShape> {
42
+ > extends Testeranto<I, O> {
39
43
  constructor(
40
- input: TestShape["iinput"],
41
- testSpecification: ITestSpecification<TestShape>,
42
- testImplementation: ITestImplementation<TestShape>,
44
+ input: I["iinput"],
45
+ testSpecification: ITestSpecification<I, O>,
46
+ testImplementation: ITestImplementation<I, O>,
43
47
  testResourceRequirement: ITTestResourceRequest,
44
- testInterface: Partial<ITestInterface<TestShape>>
48
+ testInterface: Partial<ITestInterface<I>>
45
49
  ) {
46
50
  super(
47
51
  input,
@@ -97,14 +101,16 @@ export class WebTesteranto<
97
101
  }
98
102
 
99
103
  export default async <
100
- ITestShape extends IBaseTest<
101
- unknown,
104
+ I extends Ibdd_in<
102
105
  unknown,
103
106
  unknown,
104
107
  unknown,
105
108
  unknown,
106
109
  unknown,
107
110
  unknown,
111
+ unknown
112
+ >,
113
+ O extends Ibdd_out<
108
114
  Record<string, any>,
109
115
  Record<string, any>,
110
116
  Record<string, any>,
@@ -112,13 +118,13 @@ export default async <
112
118
  Record<string, any>
113
119
  >
114
120
  >(
115
- input: ITestShape["iinput"],
116
- testSpecification: ITestSpecification<ITestShape>,
117
- testImplementation: ITestImplementation<ITestShape>,
118
- testInterface: Partial<IWebTestInterface<ITestShape>>,
121
+ input: I["iinput"],
122
+ testSpecification: ITestSpecification<I, O>,
123
+ testImplementation: ITestImplementation<I, O>,
124
+ testInterface: Partial<IWebTestInterface<I>>,
119
125
  testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
120
- ): Promise<Testeranto<ITestShape>> => {
121
- return new WebTesteranto<ITestShape>(
126
+ ): Promise<Testeranto<I, O>> => {
127
+ return new WebTesteranto<I, O>(
122
128
  input,
123
129
  testSpecification,
124
130
  testImplementation,