testeranto 0.100.0 → 0.111.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 (226) hide show
  1. package/README.md +1 -0
  2. package/bundle.js +80 -30
  3. package/package.json +40 -32
  4. package/src/Footer.tsx +4 -0
  5. package/src/Init.ts +48 -0
  6. package/src/Node.ts +23 -17
  7. package/src/PM/index.ts +1 -1
  8. package/src/PM/main.ts +524 -156
  9. package/src/PM/node.ts +2 -2
  10. package/src/PM/web.ts +1 -1
  11. package/src/ReportClient.tsx +163 -0
  12. package/src/ReportServer.ts +21 -0
  13. package/src/SubPackages/react/component/node.ts +68 -24
  14. package/src/SubPackages/react/component/web.ts +68 -25
  15. package/src/SubPackages/react/jsx/index.ts +39 -18
  16. package/src/SubPackages/react/jsx/node.ts +12 -10
  17. package/src/SubPackages/react/jsx/web.ts +27 -14
  18. package/src/SubPackages/react-dom/component/node.ts +42 -50
  19. package/src/SubPackages/react-dom/component/web.ts +28 -10
  20. package/src/SubPackages/react-dom/jsx/node.ts +54 -56
  21. package/src/SubPackages/react-dom/jsx/web.ts +55 -42
  22. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
  23. package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
  24. package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
  25. package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
  26. package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
  27. package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
  28. package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
  29. package/src/SubPackages/react-test-renderer/jsx/node.ts +8 -6
  30. package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
  31. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
  32. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
  33. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
  34. package/src/TestReport.tsx +176 -0
  35. package/src/Types.ts +63 -309
  36. package/src/Web.ts +24 -18
  37. package/src/build.ts +240 -0
  38. package/src/defaultConfig.ts +2 -1
  39. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
  40. package/src/esbuildConfigs/featuresPlugin.ts +0 -1
  41. package/src/esbuildConfigs/index.ts +1 -1
  42. package/src/esbuildConfigs/inputFilesPlugin.ts +2 -135
  43. package/src/esbuildConfigs/node.ts +4 -13
  44. package/src/esbuildConfigs/web.ts +3 -19
  45. package/src/init-docs.ts +2 -1
  46. package/src/lib/abstractBase.ts +82 -80
  47. package/src/lib/basebuilder.ts +57 -45
  48. package/src/lib/classBuilder.ts +15 -15
  49. package/src/lib/core.ts +44 -35
  50. package/src/lib/index.ts +47 -98
  51. package/src/lib/readme.md +12 -0
  52. package/src/lib/types.ts +53 -70
  53. package/src/run.ts +31 -0
  54. package/src/style.css +8 -0
  55. package/src/utils.ts +74 -2
  56. package/tsc.log +108 -0
  57. package/Bundle.Dockerfile +0 -52
  58. package/bin/init-docs.js +0 -24
  59. package/dist/common/dist/module/src/Init.js +0 -40
  60. package/dist/common/package.json +0 -3
  61. package/dist/common/src/Init.js +0 -40
  62. package/dist/common/src/Node.js +0 -27
  63. package/dist/common/src/PM/index.js +0 -7
  64. package/dist/common/src/PM/main.js +0 -941
  65. package/dist/common/src/PM/node.js +0 -128
  66. package/dist/common/src/PM/web.js +0 -121
  67. package/dist/common/src/SubPackages/puppeteer.js +0 -21
  68. package/dist/common/src/SubPackages/react/component/node.js +0 -19
  69. package/dist/common/src/SubPackages/react/component/web.js +0 -19
  70. package/dist/common/src/SubPackages/react/jsx/index.js +0 -33
  71. package/dist/common/src/SubPackages/react/jsx/node.js +0 -10
  72. package/dist/common/src/SubPackages/react/jsx/web.js +0 -10
  73. package/dist/common/src/SubPackages/react-dom/component/node.js +0 -101
  74. package/dist/common/src/SubPackages/react-dom/component/web.js +0 -67
  75. package/dist/common/src/SubPackages/react-dom/jsx/index.js +0 -2
  76. package/dist/common/src/SubPackages/react-dom/jsx/node.js +0 -39
  77. package/dist/common/src/SubPackages/react-dom/jsx/web.js +0 -117
  78. package/dist/common/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -44
  79. package/dist/common/src/SubPackages/react-test-renderer/component/index.js +0 -2
  80. package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +0 -60
  81. package/dist/common/src/SubPackages/react-test-renderer/component/node.js +0 -8
  82. package/dist/common/src/SubPackages/react-test-renderer/component/web.js +0 -8
  83. package/dist/common/src/SubPackages/react-test-renderer/fc/node.js +0 -50
  84. package/dist/common/src/SubPackages/react-test-renderer/fc/web.js +0 -50
  85. package/dist/common/src/SubPackages/react-test-renderer/jsx/index.js +0 -63
  86. package/dist/common/src/SubPackages/react-test-renderer/jsx/node.js +0 -10
  87. package/dist/common/src/SubPackages/react-test-renderer/jsx/web.js +0 -10
  88. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -42
  89. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
  90. package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
  91. package/dist/common/src/Types.js +0 -2
  92. package/dist/common/src/Web.js +0 -49
  93. package/dist/common/src/cli.js +0 -439
  94. package/dist/common/src/cli2.js +0 -144
  95. package/dist/common/src/defaultConfig.js +0 -19
  96. package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
  97. package/dist/common/src/esbuildConfigs/index.js +0 -21
  98. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -99
  99. package/dist/common/src/esbuildConfigs/node.js +0 -45
  100. package/dist/common/src/esbuildConfigs/web.js +0 -61
  101. package/dist/common/src/init-docs.js +0 -43
  102. package/dist/common/src/lib/abstractBase.js +0 -324
  103. package/dist/common/src/lib/basebuilder.js +0 -85
  104. package/dist/common/src/lib/classBuilder.js +0 -42
  105. package/dist/common/src/lib/core.js +0 -101
  106. package/dist/common/src/lib/index.js +0 -22
  107. package/dist/common/src/lib/types.js +0 -3
  108. package/dist/common/src/puppeteerConfiger.js +0 -24
  109. package/dist/common/src/utils.js +0 -16
  110. package/dist/common/src/web.html.js +0 -22
  111. package/dist/common/testeranto.js +0 -15
  112. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  113. package/dist/module/package.json +0 -3
  114. package/dist/module/src/Init.js +0 -35
  115. package/dist/module/src/Node.js +0 -20
  116. package/dist/module/src/PM/index.js +0 -3
  117. package/dist/module/src/PM/main.js +0 -911
  118. package/dist/module/src/PM/node.js +0 -121
  119. package/dist/module/src/PM/web.js +0 -117
  120. package/dist/module/src/SubPackages/puppeteer.js +0 -16
  121. package/dist/module/src/SubPackages/react/component/node.js +0 -14
  122. package/dist/module/src/SubPackages/react/component/web.js +0 -14
  123. package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
  124. package/dist/module/src/SubPackages/react/jsx/node.js +0 -5
  125. package/dist/module/src/SubPackages/react/jsx/web.js +0 -5
  126. package/dist/module/src/SubPackages/react-dom/component/node.js +0 -93
  127. package/dist/module/src/SubPackages/react-dom/component/web.js +0 -62
  128. package/dist/module/src/SubPackages/react-dom/jsx/index.js +0 -1
  129. package/dist/module/src/SubPackages/react-dom/jsx/node.js +0 -31
  130. package/dist/module/src/SubPackages/react-dom/jsx/web.js +0 -89
  131. package/dist/module/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
  132. package/dist/module/src/SubPackages/react-test-renderer/component/index.js +0 -1
  133. package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +0 -31
  134. package/dist/module/src/SubPackages/react-test-renderer/component/node.js +0 -3
  135. package/dist/module/src/SubPackages/react-test-renderer/component/web.js +0 -3
  136. package/dist/module/src/SubPackages/react-test-renderer/fc/node.js +0 -22
  137. package/dist/module/src/SubPackages/react-test-renderer/fc/web.js +0 -22
  138. package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +0 -34
  139. package/dist/module/src/SubPackages/react-test-renderer/jsx/node.js +0 -5
  140. package/dist/module/src/SubPackages/react-test-renderer/jsx/web.js +0 -5
  141. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
  142. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
  143. package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
  144. package/dist/module/src/Types.js +0 -1
  145. package/dist/module/src/Web.js +0 -42
  146. package/dist/module/src/cli.js +0 -411
  147. package/dist/module/src/cli2.js +0 -116
  148. package/dist/module/src/defaultConfig.js +0 -17
  149. package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
  150. package/dist/module/src/esbuildConfigs/index.js +0 -19
  151. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -94
  152. package/dist/module/src/esbuildConfigs/node.js +0 -40
  153. package/dist/module/src/esbuildConfigs/web.js +0 -56
  154. package/dist/module/src/init-docs.js +0 -15
  155. package/dist/module/src/lib/abstractBase.js +0 -316
  156. package/dist/module/src/lib/basebuilder.js +0 -81
  157. package/dist/module/src/lib/classBuilder.js +0 -38
  158. package/dist/module/src/lib/core.js +0 -98
  159. package/dist/module/src/lib/index.js +0 -18
  160. package/dist/module/src/lib/types.js +0 -2
  161. package/dist/module/src/puppeteerConfiger.js +0 -19
  162. package/dist/module/src/utils.js +0 -9
  163. package/dist/module/src/web.html.js +0 -20
  164. package/dist/module/testeranto.js +0 -13
  165. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  166. package/dist/prebuild/cli.mjs +0 -1491
  167. package/dist/prebuild/cli2.mjs +0 -918
  168. package/dist/prebuild/init-docs.mjs +0 -48
  169. package/dist/types/dist/module/src/Init.d.ts +0 -2
  170. package/dist/types/src/Init.d.ts +0 -2
  171. package/dist/types/src/Node.d.ts +0 -13
  172. package/dist/types/src/PM/index.d.ts +0 -34
  173. package/dist/types/src/PM/main.d.ts +0 -56
  174. package/dist/types/src/PM/node.d.ts +0 -42
  175. package/dist/types/src/PM/web.d.ts +0 -40
  176. package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
  177. package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
  178. package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
  179. package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
  180. package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
  181. package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
  182. package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
  183. package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
  184. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
  185. package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
  186. package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
  187. package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
  188. package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  189. package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
  190. package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
  191. package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
  192. package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  193. package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
  194. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
  195. package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
  196. package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
  197. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
  198. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
  199. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
  200. package/dist/types/src/Types.d.ts +0 -90
  201. package/dist/types/src/Web.d.ts +0 -10
  202. package/dist/types/src/cli.d.ts +0 -1
  203. package/dist/types/src/cli2.d.ts +0 -1
  204. package/dist/types/src/defaultConfig.d.ts +0 -3
  205. package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
  206. package/dist/types/src/esbuildConfigs/index.d.ts +0 -4
  207. package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
  208. package/dist/types/src/esbuildConfigs/node.d.ts +0 -4
  209. package/dist/types/src/esbuildConfigs/web.d.ts +0 -4
  210. package/dist/types/src/init-docs.d.ts +0 -1
  211. package/dist/types/src/lib/abstractBase.d.ts +0 -110
  212. package/dist/types/src/lib/basebuilder.d.ts +0 -27
  213. package/dist/types/src/lib/classBuilder.d.ts +0 -7
  214. package/dist/types/src/lib/core.d.ts +0 -8
  215. package/dist/types/src/lib/index.d.ts +0 -60
  216. package/dist/types/src/lib/types.d.ts +0 -40
  217. package/dist/types/src/puppeteerConfiger.d.ts +0 -4
  218. package/dist/types/src/utils.d.ts +0 -2
  219. package/dist/types/src/web.html.d.ts +0 -2
  220. package/dist/types/testeranto.d.ts +0 -16
  221. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  222. package/docker-compose.yml +0 -37
  223. package/src/SubPackages/puppeteer.ts +0 -51
  224. package/src/cli.ts +0 -535
  225. package/src/cli2.ts +0 -157
  226. package/testeranto.ts +0 -13
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,