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/PM/node.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import puppeteer, { ScreencastOptions, ScreenRecorder } from "puppeteer-core";
3
+ import { ScreencastOptions } from "puppeteer-core";
4
4
  import { PassThrough } from "stream";
5
5
 
6
6
  import { ITLog, ITTestResourceConfiguration } from "../lib";
@@ -43,7 +43,7 @@ export class PM_Node extends PM {
43
43
  throw new Error("Method not implemented.");
44
44
  }
45
45
 
46
- isDisabled(selector: string): boolean {
46
+ isDisabled(selector: string): Promise<boolean> {
47
47
  throw new Error("Method not implemented.");
48
48
  }
49
49
 
package/src/PM/web.ts CHANGED
@@ -51,7 +51,7 @@ export class PM_Web extends PM {
51
51
  return window["$"](selector);
52
52
  }
53
53
 
54
- isDisabled(selector: string): boolean {
54
+ isDisabled(selector: string): Promise<boolean> {
55
55
  return window["isDisabled"](selector);
56
56
  }
57
57
 
@@ -0,0 +1,163 @@
1
+ import ReactDom from "react-dom/client";
2
+ import React, { useEffect, useState } from "react";
3
+
4
+ import 'bootstrap/dist/css/bootstrap.min.css';
5
+ import "./style.css"
6
+
7
+ import { IRunTime, ITestTypes, IBuiltConfig } from "./lib";
8
+ import { Footer } from "./Footer";
9
+ import { Table } from "react-bootstrap";
10
+
11
+
12
+ type ICollation = {
13
+ name: string;
14
+ runTime: IRunTime;
15
+ tr: {
16
+ ports: number;
17
+ };
18
+ sidecars: ITestTypes[];
19
+ status: string;
20
+ staticAnalysis: string;
21
+ typeErrors: string;
22
+ bddErrors: string;
23
+ };
24
+
25
+ type ICollations = ICollation[];
26
+
27
+ const BigBoard = () => {
28
+
29
+ const [configs, setConfigs] = useState<IBuiltConfig>();
30
+ useEffect(() => {
31
+ (async () => {
32
+ fetch('/kokomoBay/docs/testeranto.json')
33
+ .then(response => response.json())
34
+ .then(json => {
35
+ setConfigs(json)
36
+ })
37
+ .catch(error => console.error(error));
38
+
39
+ })();
40
+ }, []);
41
+
42
+ const [bigBoard, setBigBoard] = useState<Record<string, object>>({});
43
+ useEffect(() => {
44
+ (async () => {
45
+ fetch('/kokomoBay/docs/bigBoard.json')
46
+ .then(response => response.json())
47
+ .then(json => {
48
+ setBigBoard(json)
49
+ })
50
+ .catch(error => console.error(error));
51
+
52
+ })();
53
+ }, []);
54
+
55
+ const [staticAnalysis, setStaticAnalysis] = useState<Record<string, string>>({});
56
+ useEffect(() => {
57
+ (async () => {
58
+
59
+ let accumulator = {};
60
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
61
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/lint_errors.txt`)).text()
62
+ }
63
+ setStaticAnalysis(accumulator);
64
+
65
+
66
+ })();
67
+ }, [configs, bigBoard]);
68
+
69
+ const [typeErrors, setTypeErrors] = useState<Record<string, string>>({});
70
+ useEffect(() => {
71
+ (async () => {
72
+
73
+ let accumulator = {};
74
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
75
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/type_errors.txt`)).text()
76
+ }
77
+ setTypeErrors(accumulator);
78
+
79
+
80
+ })();
81
+ }, [configs, bigBoard]);
82
+
83
+ const [bddErrors, setBddErrors] = useState<Record<string, string>>({});
84
+ useEffect(() => {
85
+ (async () => {
86
+
87
+ let accumulator = {};
88
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
89
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/bdd_errors.txt`)).text()
90
+ }
91
+ setBddErrors(accumulator);
92
+
93
+
94
+ })();
95
+ }, [configs, bigBoard]);
96
+
97
+ if (!configs || !staticAnalysis || !typeErrors || !bddErrors) {
98
+ return <div>loading...</div>
99
+ }
100
+
101
+ const collated: ICollations = configs.tests.map((c) => {
102
+ return {
103
+ ...bigBoard[c[0]],
104
+ name: c[0],
105
+ runTime: c[1],
106
+ tr: c[2],
107
+ sidecars: c[3],
108
+ staticAnalysis: staticAnalysis[c[0]],
109
+ typeErrors: typeErrors[c[0]],
110
+ bddErrors: bddErrors[c[0]],
111
+ } as ICollation
112
+ });
113
+
114
+ return <div >
115
+ <Table striped bordered hover>
116
+ <thead>
117
+ <tr>
118
+ <th></th>
119
+ <th>platform</th>
120
+ <th>BDD errors</th>
121
+ <th>Lint errors</th>
122
+ <th>Type errors</th>
123
+ <th>prompt</th>
124
+ </tr>
125
+
126
+ </thead>
127
+
128
+ <tbody>
129
+ {
130
+ ...collated.map((c) => {
131
+ return <tr>
132
+ <td>{c.name}</td>
133
+ <td>{c.runTime}</td>
134
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/littleBoard.html`}>{c.bddErrors}</a></td>
135
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/lint_errors.json`}>{c.staticAnalysis}</a></td>
136
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/type_errors.txt`}>{c.typeErrors}</a></td>
137
+
138
+
139
+ <td>
140
+ <pre>
141
+ aider --model deepseek/deepseek-chat --load {`docs/${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/prompt.txt`}
142
+ </pre>
143
+ </td>
144
+
145
+
146
+ </tr>
147
+ })
148
+ }
149
+ </tbody>
150
+
151
+ </Table>
152
+ <Footer />
153
+ </div>
154
+ }
155
+
156
+ document.addEventListener("DOMContentLoaded", function () {
157
+ const elem = document.getElementById("root");
158
+ if (elem) {
159
+ ReactDom.createRoot(elem).render(React.createElement(BigBoard, {}, []));
160
+ }
161
+ });
162
+
163
+ console.log("hello BigBoard!")
@@ -0,0 +1,21 @@
1
+ import staticServer from "node-static";
2
+ import http from "http";
3
+
4
+ const main = async () => {
5
+ process.chdir("../"); // Navigate one level up
6
+
7
+ const fileServer = new staticServer.Server(".", {});
8
+
9
+ http
10
+ .createServer(function (request, response) {
11
+ request
12
+ .addListener("end", function () {
13
+ fileServer.serve(request, response);
14
+ })
15
+ .resume();
16
+ })
17
+ .listen(8080);
18
+
19
+ console.log("Server running on port 8080");
20
+ };
21
+ main();
@@ -3,7 +3,8 @@ import React from "react";
3
3
  import Testeranto from "../../../Node.js";
4
4
 
5
5
  import {
6
- IBaseTest,
6
+ Ibdd_in,
7
+ Ibdd_out,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
9
10
  } from "../../../Types";
@@ -13,31 +14,74 @@ type ISelection = React.CElement<any, any>;
13
14
  type IStore = React.CElement<any, any>;
14
15
  type ISubject = React.CElement<any, any>;
15
16
 
16
- export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
17
- ISpec,
18
- object
19
- >;
17
+ export type IImpl<
18
+ I extends Ibdd_in<
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown,
25
+ unknown
26
+ >,
27
+ O extends Ibdd_out<
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>,
31
+ Record<string, any>,
32
+ Record<string, any>
33
+ >
34
+ > = ITestImplementation<I, O>;
20
35
 
21
- export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
36
+ export type ISpec<
37
+ I extends Ibdd_in<
38
+ unknown,
39
+ unknown,
40
+ unknown,
41
+ unknown,
42
+ unknown,
43
+ unknown,
44
+ unknown
45
+ >,
46
+ O extends Ibdd_out<
47
+ Record<string, any>,
48
+ Record<string, any>,
49
+ Record<string, any>,
50
+ Record<string, any>,
51
+ Record<string, any>
52
+ >
53
+ > = ITestSpecification<I, O>;
22
54
 
23
- export default <ITestShape extends IBaseTest, IState>(
24
- testImplementations: ITestImplementation<ITestShape>,
25
- testSpecifications: ISpec<ITestShape>,
55
+ export default <
56
+ I extends Ibdd_in<
57
+ unknown,
58
+ unknown,
59
+ unknown,
60
+ unknown,
61
+ unknown,
62
+ unknown,
63
+ unknown
64
+ >,
65
+ O extends Ibdd_out<
66
+ Record<string, any>,
67
+ Record<string, any>,
68
+ Record<string, any>,
69
+ Record<string, any>,
70
+ Record<string, any>
71
+ >
72
+ >(
73
+ testImplementations: ITestImplementation<I, O>,
74
+ testSpecifications: ISpec<I, O>,
26
75
  testInput: IInput
27
76
  ) => {
28
- return Testeranto<ITestShape>(
29
- testInput,
30
- testSpecifications,
31
- testImplementations,
32
- {
33
- beforeEach: async (): Promise<IStore> => {
34
- return new Promise((resolve, rej) => {
35
- resolve(React.createElement(testInput, {}, []));
36
- });
37
- },
38
- andWhen: function (s: IStore, whenCB): Promise<ISelection> {
39
- return whenCB()(s);
40
- },
41
- }
42
- );
77
+ return Testeranto<I, O>(testInput, testSpecifications, testImplementations, {
78
+ beforeEach: async (): Promise<IStore> => {
79
+ return new Promise((resolve, rej) => {
80
+ resolve(React.createElement(testInput, {}, []));
81
+ });
82
+ },
83
+ andWhen: function (s: IStore, whenCB): Promise<ISelection> {
84
+ return whenCB()(s);
85
+ },
86
+ });
43
87
  };
@@ -3,7 +3,8 @@ import React from "react";
3
3
  import Testeranto from "../../../Web.js";
4
4
 
5
5
  import {
6
- IBaseTest,
6
+ Ibdd_in,
7
+ Ibdd_out,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
9
10
  } from "../../../Types";
@@ -11,33 +12,75 @@ import {
11
12
  type IInput = typeof React.Component;
12
13
  type ISelection = React.CElement<any, any>;
13
14
  type Store = React.CElement<any, any>;
14
- // type Subject = React.CElement<any, any>;
15
15
 
16
- export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
17
- ISpec,
18
- object
19
- >;
16
+ export type IImpl<
17
+ I extends Ibdd_in<
18
+ unknown,
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown
25
+ >,
26
+ O extends Ibdd_out<
27
+ Record<string, any>,
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>,
31
+ Record<string, any>
32
+ >
33
+ > = ITestImplementation<I, O>;
20
34
 
21
- export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
35
+ export type ISpec<
36
+ I extends Ibdd_in<
37
+ unknown,
38
+ unknown,
39
+ unknown,
40
+ unknown,
41
+ unknown,
42
+ unknown,
43
+ unknown
44
+ >,
45
+ O extends Ibdd_out<
46
+ Record<string, any>,
47
+ Record<string, any>,
48
+ Record<string, any>,
49
+ Record<string, any>,
50
+ Record<string, any>
51
+ >
52
+ > = ITestSpecification<I, O>;
22
53
 
23
- export default <ITestShape extends IBaseTest>(
24
- testImplementations: ITestImplementation<ITestShape>,
25
- testSpecifications: ISpec<ITestShape>,
54
+ export default <
55
+ I extends Ibdd_in<
56
+ unknown,
57
+ unknown,
58
+ unknown,
59
+ unknown,
60
+ unknown,
61
+ unknown,
62
+ unknown
63
+ >,
64
+ O extends Ibdd_out<
65
+ Record<string, any>,
66
+ Record<string, any>,
67
+ Record<string, any>,
68
+ Record<string, any>,
69
+ Record<string, any>
70
+ >
71
+ >(
72
+ testImplementations: ITestImplementation<I, O>,
73
+ testSpecifications: ISpec<I, O>,
26
74
  testInput: IInput
27
75
  ) => {
28
- return Testeranto<ITestShape>(
29
- testInput,
30
- testSpecifications,
31
- testImplementations,
32
- {
33
- beforeEach: async (): Promise<Store> => {
34
- return new Promise((resolve, rej) => {
35
- resolve(React.createElement(testInput, {}, []));
36
- });
37
- },
38
- andWhen: function (s: Store, whenCB): Promise<ISelection> {
39
- return whenCB()(s);
40
- },
41
- }
42
- );
76
+ return Testeranto<I, O>(testInput, testSpecifications, testImplementations, {
77
+ beforeEach: async (): Promise<Store> => {
78
+ return new Promise((resolve, rej) => {
79
+ resolve(React.createElement(testInput, {}, []));
80
+ });
81
+ },
82
+ andWhen: function (s: Store, whenCB): Promise<ISelection> {
83
+ return whenCB()(s);
84
+ },
85
+ });
43
86
  };
@@ -2,7 +2,8 @@ import { CElement } from "react";
2
2
  import React from "react";
3
3
 
4
4
  import {
5
- IBaseTest,
5
+ Ibdd_in,
6
+ Ibdd_out,
6
7
  IPartialInterface,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
@@ -16,30 +17,50 @@ export type ISelection = CElement<any, any>;
16
17
  export type IStore = CElement<any, any>;
17
18
  export type ISubject = CElement<any, any>;
18
19
 
19
- export type ITestImpl<ITestShape extends IBaseTest> =
20
- ITestImplementation<ITestShape>;
20
+ export type ITestImpl<
21
+ I extends Ibdd_in<
22
+ unknown,
23
+ unknown,
24
+ unknown,
25
+ unknown,
26
+ unknown,
27
+ unknown,
28
+ unknown
29
+ >,
30
+ O extends Ibdd_out<
31
+ Record<string, any>,
32
+ Record<string, any>,
33
+ Record<string, any>,
34
+ Record<string, any>,
35
+ Record<string, any>
36
+ >
37
+ > = ITestImplementation<I, O>;
21
38
 
22
- export type ITestSpec<ITestShape extends IBaseTest> =
23
- ITestSpecification<ITestShape>;
39
+ export type ITestSpec<
40
+ I extends Ibdd_in<
41
+ unknown,
42
+ unknown,
43
+ unknown,
44
+ unknown,
45
+ unknown,
46
+ unknown,
47
+ unknown
48
+ >,
49
+ O extends Ibdd_out<
50
+ Record<string, any>,
51
+ Record<string, any>,
52
+ Record<string, any>,
53
+ Record<string, any>,
54
+ Record<string, any>
55
+ >
56
+ > = ITestSpecification<I, O>;
24
57
 
25
58
  export const testInterface: IPartialInterface<any> = {
26
- // beforeAll: async (proto, testResource, artificer, pm): Promise<IStore> => {
27
- // return React.createElement(proto);
28
- // // return new Promise((resolve, rej) => {
29
- // // resolve(x());
30
- // // });
31
- // },
32
- // beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
33
- // return new Promise((resolve, rej) => {
34
- // resolve(React.createElement(subject));
35
- // });
36
- // },
37
- andWhen: async (s: IStore, whenCB): Promise<IStore> => {
59
+ andWhen: async (s, whenCB) => {
38
60
  await whenCB(s());
39
61
  return new Promise((resolve, rej) => {
40
62
  resolve(React.createElement(s));
41
63
  });
42
- // return whenCB(s);
43
64
  },
44
65
  butThen: async (subject, thenCB) => {
45
66
  await thenCB(subject());
@@ -1,5 +1,5 @@
1
1
  import Testeranto from "../../../Node.js";
2
- import { IBaseTest, IPartialInterface } from "../../../Types";
2
+ import { Ibdd_in, Ibdd_out, IPartialInterface } from "../../../Types";
3
3
 
4
4
  import {
5
5
  ITestImpl,
@@ -9,14 +9,16 @@ import {
9
9
  } from "./index.js";
10
10
 
11
11
  export default <
12
- ITestShape extends IBaseTest<
13
- IInput,
14
- number,
15
- number,
16
- number,
12
+ I extends Ibdd_in<
17
13
  unknown,
18
14
  unknown,
19
15
  unknown,
16
+ unknown,
17
+ unknown,
18
+ unknown,
19
+ unknown
20
+ >,
21
+ O extends Ibdd_out<
20
22
  Record<string, any>,
21
23
  Record<string, any>,
22
24
  Record<string, any>,
@@ -24,12 +26,12 @@ export default <
24
26
  Record<string, any>
25
27
  >
26
28
  >(
27
- testImplementations: ITestImpl<ITestShape>,
28
- testSpecifications: ITestSpec<ITestShape>,
29
+ testImplementations: ITestImpl<I, O>,
30
+ testSpecifications: ITestSpec<I, O>,
29
31
  testInput: IInput,
30
- testInterface: IPartialInterface<ITestShape> = baseInterface
32
+ testInterface: IPartialInterface<I> = baseInterface
31
33
  ) => {
32
- return Testeranto<ITestShape>(
34
+ return Testeranto<I, O>(
33
35
  testInput,
34
36
  testSpecifications,
35
37
  testImplementations,
@@ -1,5 +1,6 @@
1
1
  import {
2
- IBaseTest,
2
+ Ibdd_in,
3
+ Ibdd_out,
3
4
  IPartialInterface,
4
5
  IPartialWebInterface,
5
6
  } from "../../../Types";
@@ -12,19 +13,31 @@ import {
12
13
  testInterface as baseInterface,
13
14
  } from "./index.js";
14
15
 
15
- export default <ITestShape extends IBaseTest>(
16
- testImplementations: ITestImpl<ITestShape>,
17
- testSpecifications: ITestSpec<ITestShape>,
16
+ export default <
17
+ I extends Ibdd_in<
18
+ unknown,
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown
25
+ >,
26
+ O extends Ibdd_out<
27
+ Record<string, any>,
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>,
31
+ Record<string, any>
32
+ >
33
+ >(
34
+ testImplementations: ITestImpl<I, O>,
35
+ testSpecifications: ITestSpec<I, O>,
18
36
  testInput: IInput,
19
- testInterface: IPartialWebInterface<ITestShape>
37
+ testInterface: IPartialWebInterface<I>
20
38
  ) => {
21
- return Testeranto<ITestShape>(
22
- testInput,
23
- testSpecifications,
24
- testImplementations,
25
- {
26
- ...baseInterface,
27
- ...testInterface,
28
- }
29
- );
39
+ return Testeranto<I, O>(testInput, testSpecifications, testImplementations, {
40
+ ...baseInterface,
41
+ ...testInterface,
42
+ });
30
43
  };