testeranto 0.146.2 → 0.146.5

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 (215) hide show
  1. package/dist/common/src/Node.js +9 -6
  2. package/dist/common/src/PM/PM_WithEslintAndTsc.js +75 -58
  3. package/dist/common/src/PM/main.js +131 -79
  4. package/dist/common/src/PM/node.js +1 -14
  5. package/dist/common/src/PM/nodeSidecar.js +0 -1
  6. package/dist/common/src/Pure.js +17 -1
  7. package/dist/common/src/Pure.test.js +172 -0
  8. package/dist/common/src/build.js +0 -1
  9. package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +22 -11
  10. package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +24 -0
  11. package/dist/common/src/esbuildConfigs/pure.js +2 -1
  12. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +1 -4
  13. package/dist/common/src/lib/BaseSuite.js +89 -0
  14. package/dist/common/src/lib/BaseSuite.test/node.test.js +9 -0
  15. package/dist/common/src/lib/BaseSuite.test/pure.test.js +9 -0
  16. package/dist/common/src/lib/BaseSuite.test/test.js +232 -0
  17. package/dist/common/src/lib/BaseSuite.test/web.test.js +9 -0
  18. package/dist/common/src/lib/abstractBase.js +1 -90
  19. package/dist/common/src/lib/abstractBase.test/MockGiven.js +17 -0
  20. package/dist/common/src/lib/abstractBase.test/MockThen.js +13 -0
  21. package/dist/common/src/lib/abstractBase.test/MockWhen.js +13 -0
  22. package/dist/common/src/lib/abstractBase.test/implementation.js +42 -0
  23. package/dist/common/src/lib/abstractBase.test/index.js +17 -0
  24. package/dist/common/src/lib/abstractBase.test/interface.js +12 -0
  25. package/dist/common/src/lib/abstractBase.test/specification.js +19 -0
  26. package/dist/common/src/lib/abstractBase.test/types.js +2 -0
  27. package/dist/common/src/lib/baseBuilder.test/TestBaseBuilder.js +36 -0
  28. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +97 -0
  29. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.interface.js +17 -0
  30. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.node.js +11 -0
  31. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.pure.js +11 -0
  32. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +13 -0
  33. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.types.js +2 -0
  34. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.web.js +11 -0
  35. package/dist/common/src/lib/basebuilder.js +2 -20
  36. package/dist/common/src/lib/classBuilder.test/TestClassBuilder.js +41 -0
  37. package/dist/common/src/lib/classBuilder.test/classBuilder.test.implementation.js +182 -0
  38. package/dist/common/src/lib/classBuilder.test/classBuilder.test.interface.js +17 -0
  39. package/dist/common/src/lib/classBuilder.test/classBuilder.test.js +11 -0
  40. package/dist/common/src/lib/classBuilder.test/classBuilder.test.specification.js +41 -0
  41. package/dist/common/src/lib/classBuilder.test/classBuilder.test.types.js +2 -0
  42. package/dist/common/src/lib/core.js +4 -13
  43. package/dist/common/src/lib/core.test/MockCore.js +25 -0
  44. package/dist/common/src/lib/core.test/core.test.implementation.js +102 -0
  45. package/dist/common/src/lib/core.test/core.test.interface.js +18 -0
  46. package/dist/common/src/lib/core.test/core.test.js +17 -0
  47. package/dist/common/src/lib/core.test/core.test.specification.js +33 -0
  48. package/dist/common/src/lib/core.test/core.test.types.js +2 -0
  49. package/dist/common/src/lib/pmProxy.js +9 -166
  50. package/dist/common/src/lib/pmProxy.test/implementation.js +76 -0
  51. package/dist/common/src/lib/pmProxy.test/index.js +15 -0
  52. package/dist/common/src/lib/pmProxy.test/interface.js +37 -0
  53. package/dist/common/src/lib/pmProxy.test/mockPM.js +34 -0
  54. package/dist/common/src/lib/pmProxy.test/mockPMBase.js +115 -0
  55. package/dist/common/src/lib/pmProxy.test/specification.js +39 -0
  56. package/dist/common/src/lib/pmProxy.test/types.js +2 -0
  57. package/dist/common/src/run.js +6 -6
  58. package/dist/common/testeranto.config.js +33 -18
  59. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  60. package/dist/module/src/Node.js +9 -6
  61. package/dist/module/src/PM/PM_WithEslintAndTsc.js +75 -58
  62. package/dist/module/src/PM/main.js +131 -79
  63. package/dist/module/src/PM/node.js +1 -14
  64. package/dist/module/src/PM/nodeSidecar.js +0 -1
  65. package/dist/module/src/Pure.js +17 -1
  66. package/dist/module/src/Pure.test.js +167 -0
  67. package/dist/module/src/build.js +0 -1
  68. package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +19 -11
  69. package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +21 -0
  70. package/dist/module/src/esbuildConfigs/pure.js +2 -1
  71. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +1 -4
  72. package/dist/module/src/lib/BaseSuite.js +85 -0
  73. package/dist/module/src/lib/BaseSuite.test/node.test.js +4 -0
  74. package/dist/module/src/lib/BaseSuite.test/pure.test.js +4 -0
  75. package/dist/module/src/lib/BaseSuite.test/test.js +227 -0
  76. package/dist/module/src/lib/BaseSuite.test/web.test.js +4 -0
  77. package/dist/module/src/lib/abstractBase.js +1 -89
  78. package/dist/module/src/lib/abstractBase.test/MockGiven.js +13 -0
  79. package/dist/module/src/lib/abstractBase.test/MockThen.js +9 -0
  80. package/dist/module/src/lib/abstractBase.test/MockWhen.js +9 -0
  81. package/dist/module/src/lib/abstractBase.test/implementation.js +39 -0
  82. package/dist/module/src/lib/abstractBase.test/index.js +12 -0
  83. package/dist/module/src/lib/abstractBase.test/interface.js +9 -0
  84. package/dist/module/src/lib/abstractBase.test/specification.js +15 -0
  85. package/dist/module/src/lib/abstractBase.test/types.js +1 -0
  86. package/dist/module/src/lib/baseBuilder.test/TestBaseBuilder.js +32 -0
  87. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +94 -0
  88. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.interface.js +14 -0
  89. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.node.js +6 -0
  90. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.pure.js +6 -0
  91. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +9 -0
  92. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.types.js +1 -0
  93. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.web.js +6 -0
  94. package/dist/module/src/lib/basebuilder.js +2 -20
  95. package/dist/module/src/lib/classBuilder.test/TestClassBuilder.js +37 -0
  96. package/dist/module/src/lib/classBuilder.test/classBuilder.test.implementation.js +179 -0
  97. package/dist/module/src/lib/classBuilder.test/classBuilder.test.interface.js +14 -0
  98. package/dist/module/src/lib/classBuilder.test/classBuilder.test.js +6 -0
  99. package/dist/module/src/lib/classBuilder.test/classBuilder.test.specification.js +37 -0
  100. package/dist/module/src/lib/classBuilder.test/classBuilder.test.types.js +1 -0
  101. package/dist/module/src/lib/core.js +3 -12
  102. package/dist/module/src/lib/core.test/MockCore.js +18 -0
  103. package/dist/module/src/lib/core.test/core.test.implementation.js +99 -0
  104. package/dist/module/src/lib/core.test/core.test.interface.js +15 -0
  105. package/dist/module/src/lib/core.test/core.test.js +12 -0
  106. package/dist/module/src/lib/core.test/core.test.specification.js +29 -0
  107. package/dist/module/src/lib/core.test/core.test.types.js +1 -0
  108. package/dist/module/src/lib/pmProxy.js +9 -166
  109. package/dist/module/src/lib/pmProxy.test/implementation.js +73 -0
  110. package/dist/module/src/lib/pmProxy.test/index.js +10 -0
  111. package/dist/module/src/lib/pmProxy.test/interface.js +34 -0
  112. package/dist/module/src/lib/pmProxy.test/mockPM.js +30 -0
  113. package/dist/module/src/lib/pmProxy.test/mockPMBase.js +111 -0
  114. package/dist/module/src/lib/pmProxy.test/specification.js +35 -0
  115. package/dist/module/src/lib/pmProxy.test/types.js +1 -0
  116. package/dist/module/src/run.js +6 -6
  117. package/dist/module/testeranto.config.js +33 -18
  118. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  119. package/dist/prebuild/Project.js +16 -15
  120. package/dist/prebuild/TestReport.js +14 -12
  121. package/dist/prebuild/build.mjs +34 -34
  122. package/dist/prebuild/run.mjs +259 -173
  123. package/dist/tsconfig.tsbuildinfo +1 -1
  124. package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +2 -1
  125. package/dist/types/src/PM/main.d.ts +5 -2
  126. package/dist/types/src/Pure.d.ts +2 -2
  127. package/dist/types/src/Pure.test.d.ts +36 -0
  128. package/dist/types/src/Types.d.ts +7 -6
  129. package/dist/types/src/Web.d.ts +1 -1
  130. package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +1 -1
  131. package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +2 -0
  132. package/dist/types/src/lib/BaseSuite.d.ts +39 -0
  133. package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +3 -0
  134. package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +3 -0
  135. package/dist/types/src/lib/BaseSuite.test/test.d.ts +42 -0
  136. package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +3 -0
  137. package/dist/types/src/lib/abstractBase.d.ts +1 -36
  138. package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +7 -0
  139. package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +6 -0
  140. package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +6 -0
  141. package/dist/types/src/lib/abstractBase.test/implementation.d.ts +3 -0
  142. package/dist/types/src/lib/abstractBase.test/index.d.ts +3 -0
  143. package/dist/types/src/lib/abstractBase.test/interface.d.ts +3 -0
  144. package/dist/types/src/lib/abstractBase.test/specification.d.ts +3 -0
  145. package/dist/types/src/lib/abstractBase.test/types.d.ts +39 -0
  146. package/dist/types/src/lib/baseBuilder.test/TestBaseBuilder.d.ts +15 -0
  147. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.implementation.d.ts +3 -0
  148. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.interface.d.ts +3 -0
  149. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.node.d.ts +3 -0
  150. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.pure.d.ts +3 -0
  151. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.specification.d.ts +3 -0
  152. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +20 -0
  153. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.web.d.ts +3 -0
  154. package/dist/types/src/lib/classBuilder.test/TestClassBuilder.d.ts +21 -0
  155. package/dist/types/src/lib/classBuilder.test/classBuilder.test.d.ts +3 -0
  156. package/dist/types/src/lib/classBuilder.test/classBuilder.test.implementation.d.ts +3 -0
  157. package/dist/types/src/lib/classBuilder.test/classBuilder.test.interface.d.ts +3 -0
  158. package/dist/types/src/lib/classBuilder.test/classBuilder.test.specification.d.ts +3 -0
  159. package/dist/types/src/lib/classBuilder.test/classBuilder.test.types.d.ts +56 -0
  160. package/dist/types/src/lib/core.d.ts +1 -1
  161. package/dist/types/src/lib/core.test/MockCore.d.ts +10 -0
  162. package/dist/types/src/lib/core.test/core.test.d.ts +3 -0
  163. package/dist/types/src/lib/core.test/core.test.implementation.d.ts +3 -0
  164. package/dist/types/src/lib/core.test/core.test.interface.d.ts +3 -0
  165. package/dist/types/src/lib/core.test/core.test.specification.d.ts +3 -0
  166. package/dist/types/src/lib/core.test/core.test.types.d.ts +46 -0
  167. package/dist/types/src/lib/index.d.ts +2 -1
  168. package/dist/types/src/lib/pmProxy.d.ts +11 -6
  169. package/dist/types/src/lib/pmProxy.test/implementation.d.ts +3 -0
  170. package/dist/types/src/lib/pmProxy.test/index.d.ts +7 -0
  171. package/dist/types/src/lib/pmProxy.test/interface.d.ts +3 -0
  172. package/dist/types/src/lib/pmProxy.test/mockPM.d.ts +10 -0
  173. package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +39 -0
  174. package/dist/types/src/lib/pmProxy.test/specification.d.ts +3 -0
  175. package/dist/types/src/lib/pmProxy.test/types.d.ts +42 -0
  176. package/dist/types/src/lib/types.d.ts +2 -1
  177. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  178. package/docs.html +35 -33
  179. package/index.html +23 -30
  180. package/package.json +8 -18
  181. package/src/lib/basebuilder.ts +0 -24
  182. package/testeranto/Project.css +1 -26
  183. package/testeranto/Project.js +3337 -385
  184. package/testeranto/TestReport.css +1 -26
  185. package/testeranto/TestReport.js +43 -16
  186. package/testeranto/bundles/node/allTests/metafile.json +1 -1
  187. package/testeranto/bundles/pure/allTests/metafile.json +1 -1
  188. package/testeranto/bundles/web/allTests/metafile.json +1 -1
  189. package/testeranto/index.html +1 -1
  190. package/testeranto/reports/allTests/index.html +1 -1
  191. package/testeranto/reports/allTests/src/Pure.test/pure/index.html +1 -1
  192. package/testeranto/reports/allTests/src/Pure.test/pure/lint_errors.json +137 -1539
  193. package/testeranto/reports/allTests/src/Pure.test/pure/logs.txt +2 -2
  194. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/index.html +1 -1
  195. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/lint_errors.json +58 -620
  196. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/index.html +1 -1
  197. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/lint_errors.json +58 -620
  198. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt +2 -2
  199. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/index.html +1 -1
  200. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/lint_errors.json +58 -620
  201. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/index.html +1 -1
  202. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.json +104 -966
  203. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/index.html +1 -1
  204. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.json +104 -966
  205. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/index.html +1 -1
  206. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.json +104 -966
  207. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/index.html +1 -1
  208. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/lint_errors.json +63 -791
  209. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/index.html +1 -1
  210. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.json +39 -416
  211. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/index.html +1 -1
  212. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/lint_errors.json +156 -1724
  213. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +3 -3
  214. package/testeranto.config.ts +1 -1
  215. package/tsc.log +36 -38
package/docs.html CHANGED
@@ -19,7 +19,7 @@
19
19
  <div class="parallax-background"></div>
20
20
  <div id="container">
21
21
  <h1>Testeranto docs and core concepts</h1>
22
- <p>Testeranto&#39;s type system provides a rigorous framework for Behavior-Driven Development (BDD) testing. While powerful, the API can initially seem complex but everything you need to know can be summed up in <strong>3 core functions and 5 essential types</strong>. Follow these patterns, and TypeScript&#39;s type checker will guide you through the rest.</p>
22
+ <p>Testeranto&#39;s type system provides a rigorous framework for Behavior-Driven Development (BDD) testing. The API may seem complex but everything you need to know can be summed up in <strong>1 function, 3 runtimes and 5 essential types, and 1 optional type</strong>. Follow these patterns, and TypeScript&#39;s type checker will guide you through the rest.</p>
23
23
  <h3>⚠️ this doc is a work in progress. It is 99% accurate but needs some attention to be complete. ⚠️</h3>
24
24
  <p>Let&#39;s break down the key components using a Rectangle class example.</p>
25
25
  <h3>The Test Subject</h3>
@@ -36,12 +36,24 @@
36
36
  getArea() {
37
37
  return this.width * this.height;
38
38
  }
39
- }</code></pre><h3>Testeranto&#39;s 3 functions</h3>
39
+ }</code></pre><h3>Testeranto&#39;s 1 function</h3>
40
+ <p>Testeranto has 1 function. This function launches and runs the tests. It is here that all 5 types converge and if you can type this function call correctly, the TS type system should guide you through the rest.</p>
41
+ <pre>async <I extends Ibdd_in_any, O extends Ibdd_out, M>(
42
+ input: I["iinput"],
43
+ testSpecification: ITestSpecification<I, O>,
44
+ testImplementation: ITestImplementation<I, O, M>,
45
+ testInterface: Partial<ITestInterface<I>>,
46
+ testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
47
+ ): Promise<Testeranto<I, O, M>></pre><h3>Testeranto&#39;s 3 runtimes</h3>
40
48
  <p>For each of testeranto&#39;s runtime, there is a specific Testeranto main function. Each is it&#39;s own import but all 3 are called in the same way.</p>
41
49
  <h4>Node</h4>
42
50
  <pre>import Testeranto from "testeranto/src/Node"; // <- import the Node main function
43
51
  // below this point, all runtimes are identical!
44
52
 
53
+ import { implementation } from "./Rectangle.test.implementation";
54
+ import { specification } from "./Rectangle.test.specification";
55
+ import { interface } from "./Rectangle.test.interface";
56
+
45
57
  // Note the type parameters I, O, and M: these will be important later
46
58
  export default Testeranto<
47
59
  I extends Ibdd_in,
@@ -88,36 +100,15 @@ export default Testeranto<
88
100
  specification,
89
101
  implementation,
90
102
  interface
91
- );</pre><h3>Testeranto&#39;s 5 Essential Types</h3>
92
- <p>Every testeranto test is built around these 5 types that form a complete testing pipeline:</p>
93
- <ol>
94
- <li><strong>ITestSpecification</strong> - The &quot;what&quot; of your tests (business requirements)</li>
95
- <li><strong>ITestImplementation</strong> - The &quot;how&quot; of your tests (concrete operations)</li>
96
- <li><strong>ITestInterface</strong> - The &quot;glue&quot; between specs and implementation</li>
97
- <li><strong>Ibdd_in</strong> - Defines the internal test flow shape</li>
98
- <li><strong>Ibdd_out</strong> - Defines the external test interface</li>
99
- </ol>
100
- <pre class="mermaid">flowchart LR
101
- S[ITestSpecification] -->|defines| O[Ibdd_out]
102
- I[ITestImplementation] -->|uses| O
103
- I -->|uses| M[Modifier]
104
- T[ITestInterface] -->|connects| N[Ibdd_in]
105
- S -->|flows through| N
106
- I -->|flows through| N
107
-
108
- style S fill:#2aa198,stroke:#073642
109
- style I fill:#859900,stroke:#073642
110
- style T fill:#b58900,stroke:#073642
111
- style O fill:#d33682,stroke:#073642
112
- style N fill:#cb4b16,stroke:#073642
113
- style M fill:#6c71c4,stroke:#073642</pre><h4>The Specification (ITestSpecification)</h4>
103
+ );</pre><h3>Testeranto&#39;s 5 essential types</h3>
104
+ <p>Every testeranto test is built around these 5 types that form a complete testing pipeline.</p>
105
+ <h4>The Specification (ITestSpecification)</h4>
114
106
  <p>The Specification defines the business requirements in plain language, completely separate from implementation details. This is where you describe <strong>what</strong> should be tested without worrying about <strong>how</strong>.</p>
115
107
  <ul>
116
108
  <li>Pure business logic</li>
117
109
  <li>Human-readable test descriptions</li>
118
110
  <li>Defines test suites, scenarios (Given/When/Then)</li>
119
111
  <li>Maps directly to BDD concepts</li>
120
- <li>Uses Ibdd_out for type safety</li>
121
112
  </ul>
122
113
  <pre class="language-typescript line-numbers"><code class="language-typescript">import {
123
114
  Ibdd_in,
@@ -220,9 +211,8 @@ export const implementation: ITestImplementation<
220
211
  Default: () => new Rectangle(2, 2),
221
212
  },
222
213
  };</pre><h4>The Interface aka ITestInterface</h4>
223
- <p>The test interface is code which is NOT BDD . The interface adapts your test subject so that the BDD hooks can be applied. The interface implements the traditional BDD steps &quot;before all&quot;, &quot;after all&quot;, &quot;before each&quot;, &quot;after each&quot;, etc</p>
224
- <pre>
225
- import {
214
+ <p>The test interface is code which is NOT business logic. The interface adapts your test subject so that the BDD hooks can be applied. The interface implements the traditional BDD steps &quot;before all&quot;, &quot;after all&quot;, &quot;before each&quot;, &quot;after each&quot;, etc</p>
215
+ <pre>import {
226
216
  Ibdd_in,
227
217
  ITestInterface,
228
218
  } from "testeranto/src/CoreTypes";
@@ -246,7 +236,7 @@ export const testInterface: ITestInterface<
246
236
  afterAll: () => {},
247
237
  assertThis: (x: any, y) => {},
248
238
  };</pre><h4>type I aka Ibdd_in</h4>
249
- <p>this type describes the &quot;inner&quot; shape of your BDD tests.</p>
239
+ <p>This type describes the &quot;inner&quot; shape of your BDD tests. Over the course of the execution of the test, the subject will change shapes- this test describe those changes.</p>
250
240
  <pre>import { Ibdd_in } from "testeranto/src/CoreTypes";
251
241
 
252
242
  // TODO this is inaccurate
@@ -259,7 +249,7 @@ export type I = Ibdd_in<
259
249
  (...x) => (rectangle: Rectangle, utils: IPM) => Rectangle,
260
250
  (rectangle: Rectangle, utils: IPM) => Rectangle
261
251
  >;</pre><h4>type O aka Ibdd_out</h4>
262
- <p>this type describes the &quot;outer&quot; shape of your BDD tests.</p>
252
+ <p>This type describes the &quot;outer&quot; shape of your BDD tests. This type describes the set of legal BDD clauses.</p>
263
253
  <pre>import { Ibdd_out } from "testeranto/src/CoreTypes";
264
254
 
265
255
  export type O = Ibdd_out<
@@ -295,7 +285,8 @@ export type O = Ibdd_out<
295
285
  WidthOfOneAndHeightOfOne;
296
286
  WidthAndHeightOf: [number, number];
297
287
  }
298
- >;</pre><h4>type M (optional)</h4>
288
+ >;</pre><h3>Testeranto&#39;s 1 optional type</h3>
289
+ <h4>type M (optional)</h4>
299
290
  <p>this type describes the modifications to the shape of the &quot;specification&quot;. It can be used to make your BDD tests DRYer but is not necessary</p>
300
291
  <pre>export type M = {
301
292
  givens: {
@@ -515,7 +506,18 @@ export default Testeranto<
515
506
  );
516
507
 
517
508
 
518
- </pre>
509
+ </pre><h2>Trouble shooting</h2>
510
+ <h3>Double check your runtimes.</h3>
511
+ <p>Every test has a runtime, which must defined in 2 places. Both must match.</p>
512
+ <ol>
513
+ <li>The import of the runtime</li>
514
+ <li>The runtime defined alongside the test in testeranto.config.ts</li>
515
+ </ol>
516
+ <p>By convention, test filenames reveal their runtime. Ex: <code>__tests__/yourClass.node.test</code>. This is ONLY a convention. It has no real bearing on the runtime.</p>
517
+ <h2>Dos and Don&#39;ts</h2>
518
+ <h3>Do pass your test subject to the main testeranto function.</h3>
519
+ <h3>Don&#39;t import your test subject elsewhere in your tests.</h3>
520
+
519
521
  </div>
520
522
  <!-- Prism.js JS -->
521
523
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
package/index.html CHANGED
@@ -20,24 +20,24 @@
20
20
  <div id="container">
21
21
  <h1>testeranto</h1>
22
22
  <h2>The AI-powered BDD test framework for TypeScript projects</h2>
23
- <h4>🚧 WARNING: Testeranto is still under development and is not ready for production yet. 🚧</h4>
23
+ <h4>🚧 WARNING: Testeranto is still under development but is not ready for production yet. I am rapidly working to release a beta ASAP. If you are interested in joining this beta program, please contact me. 🚧</h4>
24
24
  <ul>
25
- <li>README: <a href="https://adamwong246.github.io/testeranto/">index.html</a></li>
25
+ <li>README: <a href="https://adamwong246.github.io/testeranto/testeranto">adamwong246.github.io/testeranto/testeranto</a></li>
26
26
  <li>demo: <a href="https://www.youtube.com/embed/WvU5xMqGi6Q">youtube</a></li>
27
27
  <li>source: <a href="https://github.com/adamwong246/testeranto">github.com/adamwong246/testeranto</a></li>
28
28
  <li>npm: <a href="https://www.npmjs.com/package/testeranto">npmjs.com/package/testeranto</a></li>
29
- <li>dev: <a href="https://github.dev/adamwong246/testeranto">github.dev/adamwong246/testeranto</a></li>
30
29
  <li>example repo: <a href="https://github.com/adamwong246/testeranto-starter">testeranto-starter</a></li>
30
+ <li>tests report: <a href="https://adamwong246.github.io/testeranto/testeranto/index.html">adamwong246.github.io/testeranto/testeranto</a></li>
31
31
  </ul>
32
32
  <h2>What is testeranto?</h2>
33
33
  <ul>
34
- <li>Testeranto produces test results which can be fed to Aider.ai to automatically fix failing tests.</li>
35
- <li>Testeranto tests are specified in a strongly-typed gherkin-like syntax. Rather than testing your code directly, Testeranto requires you wrap your code with a semantic interface which is based on TS type signatures.</li>
36
- <li>Testeranto can run tests in the frontend or the backend, or both.</li>
34
+ <li>Testeranto produces test results that can be fed to Aider.ai to automatically fix failing tests.</li>
35
+ <li>Testeranto tests are specified in a strongly-typed gherkin-like syntax. Rather than testing your code directly, Testeranto requires you to wrap your code with a semantic interface that is based on TS type signatures.</li>
36
+ <li>Testeranto can run tests in the frontend, the backend, or both.</li>
37
37
  <li>Testeranto can be used to test anything that can be bundled with esbuild.</li>
38
38
  <li>Testeranto connects &quot;features&quot; to &quot;tests&quot;. This allows the AI to read feature documentation from external systems, like Jira.</li>
39
- <li>Testeranto generates test results into static a website which can be deployed to github pages easily.</li>
40
- <li>Testeranto uses esbuild to bundle it&#39;s tests. The result is used to refine the list of files added to the context of the AI. <strong>The consequence of this is that you can fit all relevant files, and ONLY the relevant files, into the LLMs context.</strong></li>
39
+ <li>Testeranto generates test results as a static website that can be easily deployed to GitHub Pages.</li>
40
+ <li>Testeranto uses esbuild to bundle its tests. The result is used to refine the list of files added to the AI&#39;s context. <strong>The consequence of this is that you can fit all relevant files, and only the relevant files, into the LLM&#39;s context.</strong></li>
41
41
  </ul>
42
42
  <h2>Key Technologies</h2>
43
43
  <table>
@@ -75,10 +75,6 @@
75
75
  <td>tsc</td>
76
76
  <td>Type checking of test files</td>
77
77
  </tr>
78
- <tr>
79
- <td>Markdown</td>
80
- <td>Feature documentation format</td>
81
- </tr>
82
78
  </tbody></table>
83
79
  <h2>Quick Start</h2>
84
80
  <ol>
@@ -113,28 +109,24 @@ yarn t-run rectangle.test.ts yourProject dev</pre><p>or build and run your tests
113
109
  <thead>
114
110
  <tr>
115
111
  <th></th>
116
- <th>Runs on</th>
117
112
  <th>You should use this runtime for...</th>
118
113
  <th>Important differences</th>
119
114
  </tr>
120
115
  </thead>
121
116
  <tbody><tr>
122
- <td><strong>Node</strong></td>
123
- <td>node V8 with fork</td>
117
+ <td><strong>Node</strong> : node V8 with fork</td>
124
118
  <td>testing backend code, Node APIs (like <code>fs</code> and <code>crypto</code>), or anything needing filesystem access</td>
125
119
  <td>has access to the filesystem and io</td>
126
120
  </tr>
127
121
  <tr>
128
- <td><strong>Web</strong></td>
129
- <td>chrome browser</td>
122
+ <td><strong>Web</strong> : chrome browser</td>
130
123
  <td>testing frontend code, anything that uses <code>document</code> or <code>window</code>, UI interactions, or visual regression</td>
131
124
  <td>can take screenshots/recordings</td>
132
125
  </tr>
133
126
  <tr>
134
- <td><strong>Pure</strong></td>
135
- <td>node v8, dynamically imported</td>
136
- <td>testing code which can run on both node-v8 and the the browser</td>
137
- <td>Very similar to &quot;Node&quot; but has no IO access and thus, no console.log. This runtime is theoretically faster.</td>
127
+ <td><strong>Pure</strong> : node v8, dynamically imported</td>
128
+ <td>testing code that can run on both node-v8 and the browser</td>
129
+ <td>Very similar to &quot;Node&quot; but has no IO access and thus no console.log. This runtime is theoretically faster.</td>
138
130
  </tr>
139
131
  </tbody></table>
140
132
  <h2>CLI Commands</h2>
@@ -185,7 +177,7 @@ yarn t-run test/rectangle.test.ts once
185
177
  # Get AI help with failures
186
178
  yarn t-aider</pre><h2>Aider</h2>
187
179
  <p>Testeranto generates a &quot;prompt&quot; alongside test results. This prompt is passed to aider as input.</p>
188
- <pre>// input src files which can be edited by aider
180
+ <pre>// input src files that can be edited by Aider
189
181
  /add test/node.ts
190
182
 
191
183
  // test report files that inform aider but should not be edited
@@ -214,18 +206,19 @@ test0: Given.Default(
214
206
  [Then.getWidth(4), Then.getHeight(19)]
215
207
  ),
216
208
  ...
217
- </code></pre><h2>Sidecars (COMING SOON)</h2>
218
- <p>Along side your test, you can include a number of &quot;sidecars&quot; which are other bundled javascript assets upon which your test depends. For example, suppose you have an app with a frontend and backend component. You could run a react test in the web and include the node http server as a sidecar.</p>
219
- <h2><code>eslint</code> and <code>tsc</code></h2>
220
- <p>Alongside the bdd tests, testeranto runs eslint and tsc upon the input files to generate a list of static analysis errors and a list of type errors, respectively.</p>
209
+ </code></pre><h2><code>eslint</code> and <code>tsc</code></h2>
210
+ <p>Alongside the BDD tests, Testeranto runs ESLint and tsc on the input files to generate a list of static analysis errors and type errors, respectively.</p>
211
+ <hr>
212
+ <h2>Sidecars (COMING SOON)</h2>
213
+ <p>Alongside your test, you can include a number of &quot;sidecars&quot; - other bundled JavaScript assets upon which your test depends. For example, suppose you have an app with frontend and backend components. You could run a React test in the web and include the Node HTTP server as a sidecar.</p>
221
214
  <h2>Subprojects</h2>
222
- <p>Testeranto has a core repo, but there are also subprojects which implement tests by type and by technology</p>
215
+ <p>Testeranto has a core repo, but there are also sub-projects which implement tests by type and by technology</p>
223
216
  <h3>testeranto-solidity</h3>
224
- <p>Test a solidity contract. Also included is an example of deploying a contrct to a ganache server.</p>
217
+ <p>Test a solidity contract. Also included is an example of deploying a contract to a ganache server.</p>
225
218
  <h3>testeranto-reduxtoolkit</h3>
226
- <p>Test a redux store.</p>
219
+ <p>Tests a Redux store.</p>
227
220
  <h3>testeranto-http</h3>
228
- <p>Test a node http server.</p>
221
+ <p>Tests a Node HTTP server.</p>
229
222
  <h3>testeranto-react (COMING SOON)</h3>
230
223
  <p>Test a react component. You can choose from a variety of types (jsx functions, class style, etc) and you can test with <code>react</code>, <code>react-dom</code>, or <code>react-test-renderer</code></p>
231
224
  <h3>testeranto-express (COMING SOON)</h3>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testeranto",
3
3
  "description": "the AI powered BDD test framework for typescript projects",
4
- "version": "0.146.2",
4
+ "version": "0.146.5",
5
5
  "engines": {
6
6
  "node": "18.18.0"
7
7
  },
@@ -132,7 +132,8 @@
132
132
  "t-run": "tsx src/run.ts",
133
133
  "t-init": "tsx dist/prebuild/init-docs.mjs",
134
134
  "t-report": "tsx dist/prebuild/ReportServer.mjs",
135
- "build-docs": "node scripts/compile-docs.js"
135
+ "build-docs": "node scripts/compile-docs.js",
136
+ "do_it": "clear && rm -rf testeranto/** && yarn build && yarn t-init && yarn t-build allTests once && yarn t-run allTests once && yarn build-docs && yarn type-check"
136
137
  },
137
138
  "peerDependencies": {
138
139
  "@types/react": "18.2.0",
@@ -145,6 +146,9 @@
145
146
  "typescript": "4.8.2",
146
147
  "typescript-eslint": "^8.29.0"
147
148
  },
149
+ "dependenciesPurpose": {
150
+ "express": "Used in unfinished feature 'mothership'"
151
+ },
148
152
  "devDependencies": {
149
153
  "@eslint/js": "^9.23.0",
150
154
  "@swc/core": "^1.3.26",
@@ -159,8 +163,6 @@
159
163
  "@typescript-eslint/eslint-plugin": "^5.46.0",
160
164
  "@typescript-eslint/parser": "^5.46.0",
161
165
  "marked": "^12.0.2",
162
- "testeranto-solidity": "latest",
163
- "testeranto_with_reduxjs_toolkit": "latest",
164
166
  "ts-node": "^10.9.1",
165
167
  "typescript": "^5.8.2"
166
168
  },
@@ -176,7 +178,6 @@
176
178
  "bootstrap": "^5.3.4",
177
179
  "chai": "^5.2.0",
178
180
  "chromium": "^3.0.3",
179
- "dot-prop": "^9.0.0",
180
181
  "esbuild": "0.17.5",
181
182
  "esbuild-plugin-external-package": "^1.0.0",
182
183
  "esbuild-plugin-import-map": "^2.1.0",
@@ -190,30 +191,19 @@
190
191
  "express": "^4.21.2",
191
192
  "fs-extra": "^11.2.0",
192
193
  "fs.promises.exists": "^1.1.4",
193
- "glob": "^10.3.12",
194
- "is-path-inside": "^4.0.0",
195
- "iterm-tab": "^0.4.0",
196
- "live-server": "^1.2.2",
197
194
  "mermaid": "^11.8.1",
198
195
  "mermaid-isomorphic": "^3.0.4",
199
196
  "node-static": "^0.7.11",
200
- "octokit": "^4.1.2",
201
197
  "puppeteer": "^24.4.0",
202
198
  "puppeteer-core": "24.4.0",
203
199
  "react": "18.2.0",
204
200
  "react-bootstrap": "^2.10.9",
205
201
  "react-dom": "18.2.0",
206
- "react-router-dom": "6.29.0",
207
- "react-test-renderer": "18.2.0",
208
- "recursive-watch": "^1.1.4",
209
- "rpc-over-ipc": "^1.0.0",
210
- "testeranto": "^0.125.3",
202
+ "testeranto": "",
211
203
  "tsc-prog": "^2.3.0",
212
204
  "tsx": "^4.19.3",
213
205
  "typescript-eslint": "^8.29.1",
214
206
  "url": "^0.11.4",
215
- "uuid": "^10.0.0",
216
- "why-is-node-running": "^3.2.2",
217
- "ws": "^8.16.0"
207
+ "uuid": "^10.0.0"
218
208
  }
219
209
  }
@@ -130,30 +130,6 @@ export abstract class BaseBuilder<
130
130
 
131
131
  await puppetMaster.writeFileSync(`bdd_errors.txt`, fails.toString());
132
132
 
133
- // await puppetMaster.writeFileSync(
134
- // `index.html`,
135
- // `
136
- // <!DOCTYPE html>
137
- // <html lang="en">
138
-
139
- // <head>
140
- // <meta name="description" content="Webpage description goes here" />
141
- // <meta charset="utf-8" />
142
- // <title>kokomoBay - testeranto</title>
143
- // <meta name="viewport" content="width=device-width, initial-scale=1" />
144
- // <meta name="author" content="" />
145
-
146
- // <link rel="stylesheet" href="/kokomoBay/testeranto/TestReport.css" />
147
- // <script src="/kokomoBay/testeranto/TestReport.js"></script>
148
-
149
- // </head>
150
-
151
- // <body>
152
- // <div id="root"/>
153
- // </body>
154
- // `
155
- // );
156
-
157
133
  await puppetMaster.writeFileSync(
158
134
  `tests.json`,
159
135
  JSON.stringify(this.toObj(), null, 2)
@@ -2030,10 +2030,6 @@ progress {
2030
2030
  display: block;
2031
2031
  padding: 0;
2032
2032
  }
2033
- .form-control::-moz-placeholder {
2034
- color: var(--bs-secondary-color);
2035
- opacity: 1;
2036
- }
2037
2033
  .form-control::placeholder {
2038
2034
  color: var(--bs-secondary-color);
2039
2035
  opacity: 1;
@@ -2513,19 +2509,10 @@ textarea.form-control-lg {
2513
2509
  .form-floating > .form-control-plaintext {
2514
2510
  padding: 1rem .75rem;
2515
2511
  }
2516
- .form-floating > .form-control-plaintext::-moz-placeholder,
2517
- .form-floating > .form-control::-moz-placeholder {
2518
- color: transparent;
2519
- }
2520
2512
  .form-floating > .form-control-plaintext::placeholder,
2521
2513
  .form-floating > .form-control::placeholder {
2522
2514
  color: transparent;
2523
2515
  }
2524
- .form-floating > .form-control-plaintext:not(:-moz-placeholder),
2525
- .form-floating > .form-control:not(:-moz-placeholder) {
2526
- padding-top: 1.625rem;
2527
- padding-bottom: .625rem;
2528
- }
2529
2516
  .form-floating > .form-control-plaintext:focus,
2530
2517
  .form-floating > .form-control-plaintext:not(:placeholder-shown),
2531
2518
  .form-floating > .form-control:focus,
@@ -2543,9 +2530,6 @@ textarea.form-control-lg {
2543
2530
  padding-bottom: .625rem;
2544
2531
  padding-left: .75rem;
2545
2532
  }
2546
- .form-floating > .form-control:not(:-moz-placeholder) ~ label {
2547
- transform: scale(.85) translateY(-.5rem) translateX(.15rem);
2548
- }
2549
2533
  .form-floating > .form-control-plaintext ~ label,
2550
2534
  .form-floating > .form-control:focus ~ label,
2551
2535
  .form-floating > .form-control:not(:placeholder-shown) ~ label,
@@ -2555,15 +2539,6 @@ textarea.form-control-lg {
2555
2539
  .form-floating > .form-control:-webkit-autofill ~ label {
2556
2540
  transform: scale(.85) translateY(-.5rem) translateX(.15rem);
2557
2541
  }
2558
- .form-floating > textarea:not(:-moz-placeholder) ~ label::after {
2559
- position: absolute;
2560
- inset: 1rem 0.375rem;
2561
- z-index: -1;
2562
- height: 1.5em;
2563
- content: "";
2564
- background-color: var(--bs-body-bg);
2565
- border-radius: var(--bs-border-radius);
2566
- }
2567
2542
  .form-floating > textarea:focus ~ label::after,
2568
2543
  .form-floating > textarea:not(:placeholder-shown) ~ label::after {
2569
2544
  position: absolute;
@@ -11360,7 +11335,7 @@ footer {
11360
11335
 
11361
11336
  bootstrap/dist/css/bootstrap.min.css:
11362
11337
  (*!
11363
- * Bootstrap v5.3.4 (https://getbootstrap.com/)
11338
+ * Bootstrap v5.3.5 (https://getbootstrap.com/)
11364
11339
  * Copyright 2011-2025 The Bootstrap Authors
11365
11340
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
11366
11341
  *)