testeranto 0.49.9 → 0.62.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 (241) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +71 -9
  3. package/dist/cjs-shim.js +12 -0
  4. package/dist/common/Features.js +2 -3
  5. package/dist/common/Node.js +53 -61
  6. package/dist/common/Project.js +272 -606
  7. package/dist/common/SubPackages/puppeteer.js +19 -0
  8. package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
  9. package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
  10. package/dist/common/SubPackages/react/jsx/index.js +13 -0
  11. package/dist/common/SubPackages/react/jsx/node.js +10 -0
  12. package/dist/common/SubPackages/react/jsx/web.js +10 -0
  13. package/dist/common/{subPackages → SubPackages}/react-dom/component/node.js +6 -6
  14. package/dist/common/{subPackages → SubPackages}/react-dom/component/web.js +11 -12
  15. package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
  16. package/dist/common/{subPackages → SubPackages}/react-dom/jsx/web.js +6 -27
  17. package/dist/common/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
  18. package/dist/common/{subPackages → SubPackages}/react-test-renderer/component/index.js +26 -15
  19. package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
  20. package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
  21. package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/node.js +4 -4
  22. package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/web.js +4 -4
  23. package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
  24. package/dist/common/{subPackages/react-test-renderer/jsx-promised → SubPackages/react-test-renderer/jsx}/node.js +4 -4
  25. package/dist/common/{subPackages/react → SubPackages/react-test-renderer}/jsx/web.js +4 -4
  26. package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
  27. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
  28. package/dist/common/Types.js +32 -0
  29. package/dist/common/Web.js +41 -112
  30. package/dist/common/electron.js +188 -44
  31. package/dist/common/esbuildConfigs/features.js +14 -0
  32. package/dist/common/esbuildConfigs/index.js +20 -0
  33. package/dist/common/esbuildConfigs/node.js +35 -0
  34. package/dist/common/esbuildConfigs/report.js +48 -0
  35. package/dist/common/esbuildConfigs/tests.js +14 -0
  36. package/dist/common/esbuildConfigs/web.js +50 -0
  37. package/dist/common/lib/abstractBase.js +193 -0
  38. package/dist/common/lib/basebuilder.js +86 -0
  39. package/dist/common/lib/browser.js +26 -0
  40. package/dist/common/lib/classBuilder.js +41 -0
  41. package/dist/common/lib/core.js +52 -0
  42. package/dist/common/lib/index.js +19 -0
  43. package/dist/common/nodeWriterElectron.js +55 -0
  44. package/dist/common/preload.js +22 -21
  45. package/dist/common/report.html.js +31 -0
  46. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  47. package/dist/common/web.html.js +22 -0
  48. package/dist/module/Features.js +2 -3
  49. package/dist/module/Node.js +53 -61
  50. package/dist/module/Project.js +272 -583
  51. package/dist/module/SubPackages/puppeteer.js +14 -0
  52. package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
  53. package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
  54. package/dist/module/SubPackages/react/jsx/index.js +10 -0
  55. package/dist/module/SubPackages/react/jsx/node.js +5 -0
  56. package/dist/module/SubPackages/react/jsx/web.js +5 -0
  57. package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +5 -5
  58. package/dist/module/{subPackages → SubPackages}/react-dom/component/web.js +10 -11
  59. package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
  60. package/dist/module/{subPackages → SubPackages}/react-dom/jsx/web.js +5 -26
  61. package/dist/module/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
  62. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/index.js +23 -15
  63. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
  64. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
  65. package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
  66. package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/web.js +3 -3
  67. package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
  68. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
  69. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
  70. package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
  71. package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
  72. package/dist/module/Types.js +30 -1
  73. package/dist/module/Web.js +41 -112
  74. package/dist/module/electron.js +189 -45
  75. package/dist/module/esbuildConfigs/features.js +12 -0
  76. package/dist/module/esbuildConfigs/index.js +18 -0
  77. package/dist/module/esbuildConfigs/node.js +30 -0
  78. package/dist/module/esbuildConfigs/report.js +48 -0
  79. package/dist/module/esbuildConfigs/tests.js +12 -0
  80. package/dist/module/esbuildConfigs/web.js +45 -0
  81. package/dist/module/lib/abstractBase.js +185 -0
  82. package/dist/module/lib/basebuilder.js +82 -0
  83. package/dist/module/lib/browser.js +22 -0
  84. package/dist/module/lib/classBuilder.js +37 -0
  85. package/dist/module/lib/core.js +49 -0
  86. package/dist/module/lib/index.js +15 -0
  87. package/dist/module/nodeWriterElectron.js +52 -0
  88. package/dist/module/preload.js +22 -21
  89. package/dist/module/report.html.js +29 -0
  90. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  91. package/dist/module/web.html.js +20 -0
  92. package/dist/prebuild/Report.css +10326 -0
  93. package/dist/prebuild/Report.js +37456 -0
  94. package/dist/types/Features.d.ts +5 -5
  95. package/dist/types/Node.d.ts +4 -11
  96. package/dist/types/NodeWriter.d.ts +1 -1
  97. package/dist/types/Project.d.ts +2 -27
  98. package/dist/types/SubPackages/puppeteer.d.ts +6 -0
  99. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  100. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  101. package/dist/types/SubPackages/react/jsx/index.d.ts +15 -0
  102. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  103. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  104. package/dist/types/{subPackages → SubPackages}/react-dom/component/node.d.ts +2 -4
  105. package/dist/types/SubPackages/react-dom/component/web.d.ts +5 -0
  106. package/dist/types/{subPackages → SubPackages}/react-dom/jsx/index.d.ts +3 -3
  107. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
  108. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  109. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
  110. package/dist/types/{subPackages → SubPackages}/react-test-renderer/component/index.d.ts +6 -6
  111. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +9 -0
  112. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
  113. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  114. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
  115. package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
  116. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
  117. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
  118. package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.d.ts +4 -4
  119. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
  120. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
  121. package/dist/types/Types.d.ts +116 -3
  122. package/dist/types/Web.d.ts +4 -11
  123. package/dist/types/esbuildConfigs/features.d.ts +4 -0
  124. package/dist/types/esbuildConfigs/index.d.ts +4 -0
  125. package/dist/types/esbuildConfigs/node.d.ts +4 -0
  126. package/dist/types/esbuildConfigs/report.d.ts +0 -0
  127. package/dist/types/esbuildConfigs/tests.d.ts +4 -0
  128. package/dist/types/esbuildConfigs/web.d.ts +4 -0
  129. package/dist/types/lib/abstractBase.d.ts +102 -0
  130. package/dist/types/lib/basebuilder.d.ts +24 -0
  131. package/dist/types/lib/browser.d.ts +6 -0
  132. package/dist/types/lib/classBuilder.d.ts +6 -0
  133. package/dist/types/lib/core.d.ts +7 -0
  134. package/dist/types/lib/index.d.ts +57 -0
  135. package/dist/types/nodeWriterElectron.d.ts +2 -0
  136. package/dist/types/report.html.d.ts +2 -0
  137. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  138. package/dist/types/web.html.d.ts +2 -0
  139. package/electronBuild.ts +32 -0
  140. package/index.html +30 -0
  141. package/package.json +120 -85
  142. package/src/Features.ts +2 -4
  143. package/src/Node.ts +114 -160
  144. package/src/NodeWriter.ts +1 -4
  145. package/src/Project.ts +610 -753
  146. package/src/Report.tsx +30 -15
  147. package/src/SubPackages/puppeteer.ts +46 -0
  148. package/src/{subPackages → SubPackages}/react/component/node.ts +12 -32
  149. package/src/SubPackages/react/component/web.ts +53 -0
  150. package/src/SubPackages/react/jsx/index.ts +43 -0
  151. package/src/SubPackages/react/jsx/node.ts +29 -0
  152. package/src/SubPackages/react/jsx/web.ts +28 -0
  153. package/src/{subPackages → SubPackages}/react-dom/component/node.ts +11 -25
  154. package/src/{subPackages → SubPackages}/react-dom/component/web.ts +27 -32
  155. package/src/{subPackages → SubPackages}/react-dom/jsx/index.ts +3 -5
  156. package/src/SubPackages/react-dom/jsx/node.ts +68 -0
  157. package/src/{subPackages → SubPackages}/react-dom/jsx/web.ts +19 -62
  158. package/src/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.ts +9 -28
  159. package/src/{subPackages → SubPackages}/react-test-renderer/component/index.ts +31 -29
  160. package/src/SubPackages/react-test-renderer/component/node.ts +22 -0
  161. package/src/SubPackages/react-test-renderer/component/web.ts +22 -0
  162. package/src/{subPackages → SubPackages}/react-test-renderer/fc/node.ts +14 -28
  163. package/src/{subPackages → SubPackages}/react-test-renderer/fc/web.ts +9 -25
  164. package/src/{subPackages → SubPackages}/react-test-renderer/jsx/index.ts +19 -16
  165. package/src/SubPackages/react-test-renderer/jsx/node.ts +24 -0
  166. package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
  167. package/src/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.ts +7 -15
  168. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
  169. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
  170. package/src/Types.ts +334 -3
  171. package/src/Web.ts +104 -230
  172. package/src/cjs-shim.js +12 -0
  173. package/src/electron.ts +237 -46
  174. package/src/esbuildConfigs/features.ts +18 -0
  175. package/src/esbuildConfigs/index.ts +22 -0
  176. package/src/esbuildConfigs/node.ts +59 -0
  177. package/src/esbuildConfigs/report.ts +51 -0
  178. package/src/esbuildConfigs/tests.ts +20 -0
  179. package/src/esbuildConfigs/web.ts +73 -0
  180. package/src/lib/abstractBase.ts +459 -0
  181. package/src/lib/basebuilder.ts +253 -0
  182. package/src/lib/browser.ts +34 -0
  183. package/src/lib/classBuilder.ts +137 -0
  184. package/src/lib/core.ts +182 -0
  185. package/src/lib/index.ts +116 -0
  186. package/src/nodeWriterElectron.ts +71 -0
  187. package/src/preload.ts +23 -21
  188. package/src/report.html.ts +29 -0
  189. package/src/web.html.ts +20 -0
  190. package/tests/Rectangle.test.ts +189 -0
  191. package/tsconfig.json +19 -6
  192. package/tsconfig.module.json +15 -4
  193. package/tsconfig.types.json +14 -4
  194. package/yarn-error.log +3144 -0
  195. package/dist/common/core.js +0 -397
  196. package/dist/common/subPackages/react/jsx/index.js +0 -26
  197. package/dist/common/subPackages/react-dom/jsx/node.js +0 -95
  198. package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
  199. package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
  200. package/dist/module/Report.js +0 -186
  201. package/dist/module/core.js +0 -388
  202. package/dist/module/subPackages/react/jsx/index.js +0 -22
  203. package/dist/module/subPackages/react/jsx/node.js +0 -5
  204. package/dist/module/subPackages/react/jsx/web.js +0 -5
  205. package/dist/module/subPackages/react-dom/jsx/node.js +0 -87
  206. package/dist/module/subPackages/react-test-renderer/jsx/web.js +0 -5
  207. package/dist/module/subPackages/react-test-renderer/jsx-promised/node.js +0 -5
  208. package/dist/types/core.d.ts +0 -220
  209. package/dist/types/subPackages/react/component/node.d.ts +0 -12
  210. package/dist/types/subPackages/react/component/web.d.ts +0 -12
  211. package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
  212. package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
  213. package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
  214. package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
  215. package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -8
  216. package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -5
  217. package/dist/types/subPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -8
  218. package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
  219. package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
  220. package/dist/types/subPackages/react-test-renderer/fc/node.d.ts +0 -9
  221. package/dist/types/subPackages/react-test-renderer/fc/web.d.ts +0 -9
  222. package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
  223. package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
  224. package/dist/types/subPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
  225. package/dist/types/subPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
  226. package/src/core.ts +0 -1399
  227. package/src/subPackages/react/component/web.ts +0 -80
  228. package/src/subPackages/react/jsx/index.ts +0 -64
  229. package/src/subPackages/react/jsx/node.ts +0 -29
  230. package/src/subPackages/react/jsx/web.ts +0 -29
  231. package/src/subPackages/react-dom/jsx/node.ts +0 -146
  232. package/src/subPackages/react-test-renderer/component/node.ts +0 -30
  233. package/src/subPackages/react-test-renderer/component/web.ts +0 -30
  234. package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
  235. package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
  236. package/src/subPackages/react-test-renderer/jsx-promised/node.ts +0 -31
  237. package/src/subPackages/react-test-renderer/jsx-promised/web.ts +0 -31
  238. /package/dist/common/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  239. /package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  240. /package/dist/module/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  241. /package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
@@ -1,80 +0,0 @@
1
- import React from "react";
2
-
3
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
4
- import Testeranto from "../../../Web";
5
-
6
- import { CElement } from "react";
7
-
8
- type IWhenShape = any;
9
- type IThenShape = any;
10
-
11
- type Super<T> = T extends infer U ? U : object;
12
-
13
- type IInput = typeof React.Component; //Super<React.Element>; //number; //typeof React.Component;
14
- // type IState is the props
15
- type ISelection = React.CElement<any, any>
16
- type Store = React.CElement<any, any>
17
- type Subject = React.CElement<any, any>
18
-
19
- export type IImpl<
20
- ISpec extends ITTestShape,
21
- IState
22
- > = ITestImplementation<
23
- IState,
24
- ISelection,
25
- IWhenShape,
26
- IThenShape,
27
- ISpec
28
- >
29
-
30
- export type ISpec<
31
- T extends ITTestShape
32
- > = ITestSpecification<
33
- T,
34
- Subject,
35
- Store,
36
- ISelection,
37
- IThenShape
38
- >;
39
-
40
- export default <
41
- ITestShape extends ITTestShape,
42
- IState
43
- >(
44
- testImplementations: ITestImplementation<
45
- IState,
46
- ISelection,
47
- IWhenShape,
48
- IThenShape,
49
- ITestShape
50
- >,
51
- testSpecifications: ISpec<ITestShape>,
52
- testInput: IInput
53
- ) => {
54
- return Testeranto<
55
- ITestShape,
56
- IInput,
57
- Subject,
58
- Store,
59
- ISelection,
60
- IThenShape,
61
- IWhenShape,
62
- IState
63
- >(
64
- testInput,
65
- testSpecifications,
66
- testImplementations,
67
- {
68
- beforeEach: async (
69
- ): Promise<Store> => {
70
- return new Promise((resolve, rej) => {
71
- resolve(React.createElement(testInput, {
72
- }, []));
73
- });
74
- },
75
- andWhen: function (s: Store, actioner): Promise<ISelection> {
76
- return actioner()(s);
77
- },
78
- },
79
- )
80
- };
@@ -1,64 +0,0 @@
1
- import { CElement, useEffect, useRef } from "react";
2
- import React from "react";
3
-
4
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
5
-
6
- export type IWhenShape = any;
7
- export type IThenShape = any;
8
- export type InitialState = unknown;
9
- export type IInput = () => JSX.Element;
10
- export type ISelection = CElement<any, any>
11
- export type IStore = CElement<any, any>
12
- export type ISubject = CElement<any, any>
13
-
14
- export type ITestImpl<
15
- ITestShape extends ITTestShape
16
- > = ITestImplementation<
17
- InitialState,
18
- ISelection,
19
- IWhenShape,
20
- IThenShape,
21
- ITestShape
22
- >
23
-
24
- export type ITestSpec<
25
- ITestShape extends ITTestShape
26
- > = ITestSpecification<
27
- ITestShape,
28
- ISubject,
29
- IStore,
30
- ISelection,
31
- IThenShape
32
- >
33
-
34
- // const TesterantoComponent = (testInput) => (props) => {
35
- // const myContainer = useRef(null);
36
-
37
- // useEffect(() => {
38
- // console.log(
39
- // "useeffectCalled"
40
- // );
41
-
42
- // props.done(myContainer.current);
43
- // }, []);
44
-
45
- // return React.createElement('div', { ref: myContainer }, testInput()); //testInput();
46
- // };
47
-
48
- export const testInterface = (testInput) => {
49
- return {
50
- beforeEach: async (
51
- x,
52
- ndx,
53
- testRsource,
54
- artificer
55
- ): Promise<IStore> => {
56
- return new Promise((resolve, rej) => {
57
- resolve(testInput())
58
- });
59
- },
60
- andWhen: function (s: IStore, actioner): Promise<ISelection> {
61
- return actioner()(s);
62
- },
63
- }
64
- }
@@ -1,29 +0,0 @@
1
- import Testeranto from "../../../Node";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import {
6
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState, testInterface
7
- } from ".";
8
-
9
- export default <ITestShape extends ITTestShape>(
10
- testImplementations: ITestImpl<ITestShape>,
11
- testSpecifications: ITestSpec<ITestShape>,
12
- testInput: IInput
13
- ) => {
14
- return Testeranto<
15
- ITestShape,
16
- IInput,
17
- ISubject,
18
- IStore,
19
- ISelection,
20
- IThenShape,
21
- IWhenShape,
22
- InitialState
23
- >(
24
- testInput,
25
- testSpecifications,
26
- testImplementations,
27
- testInterface(testInput),
28
- )
29
- };
@@ -1,29 +0,0 @@
1
- import Testeranto from "../../../Web";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import {
6
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState, testInterface
7
- } from ".";
8
-
9
- export default <ITestShape extends ITTestShape>(
10
- testImplementations: ITestImpl<ITestShape>,
11
- testSpecifications: ITestSpec<ITestShape>,
12
- testInput: IInput
13
- ) => {
14
- return Testeranto<
15
- ITestShape,
16
- IInput,
17
- ISubject,
18
- IStore,
19
- ISelection,
20
- IThenShape,
21
- IWhenShape,
22
- InitialState
23
- >(
24
- testInput,
25
- testSpecifications,
26
- testImplementations,
27
- testInterface(testInput),
28
- )
29
- };
@@ -1,146 +0,0 @@
1
- import Testeranto from "../../../Node";
2
-
3
- import React, { ReactNode, createElement } from "react";
4
- import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
5
- import Stream from 'stream'
6
-
7
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
8
- import {
9
- IInput, ISelection, IStore,
10
- // ISubject,
11
- IThenShape, IWhenShape, IState
12
- } from ".";
13
-
14
- export type ISubject = void;
15
-
16
- export {
17
- renderToStaticMarkup, renderToStaticNodeStream, Stream
18
- }
19
-
20
- export default <ITestShape extends ITTestShape>(
21
- testImplementations: ITestImplementation<
22
- IState,
23
- ISelection,
24
- IWhenShape,
25
- IThenShape,
26
- ITestShape
27
- >,
28
- testSpecifications: ITestSpecification<
29
- ITestShape,
30
- ISubject,
31
- IStore,
32
- ISelection,
33
- IThenShape
34
- >,
35
- testInput: IInput
36
- ) => {
37
- return Testeranto<
38
- ITestShape,
39
- IInput,
40
- ISubject,
41
- IStore,
42
- ISelection,
43
- IThenShape,
44
- IWhenShape,
45
- IState
46
- >(
47
- testInput,
48
- testSpecifications,
49
- testImplementations,
50
- {
51
- beforeAll: async (
52
- prototype,
53
- artificer
54
- ): Promise<ISubject> => {
55
- return await new Promise((resolve, rej) => {
56
- resolve();
57
- })
58
- },
59
- beforeEach: async (
60
- reactComponent,
61
- ndx,
62
- testRsource,
63
- artificer
64
- ): Promise<IStore> => {
65
- return new Promise((resolve, rej) => {
66
- // Ignore these type errors
67
- resolve(createElement(testInput));
68
- });
69
- },
70
- andWhen: async function (s: IStore, actioner): Promise<ISelection> {
71
- // return actioner()(s);
72
- return s
73
- },
74
- butThen: async function (s: IStore): Promise<ISelection> {
75
- return s;
76
- },
77
- afterEach: async function (
78
- store: IStore,
79
- ndx,
80
- artificer
81
- ) {
82
- return {};
83
- },
84
- afterAll: (store: IStore, artificer) => {
85
- return;
86
- },
87
- },
88
- )
89
- };
90
-
91
-
92
- // type IInput = typeof React.Component;
93
- // type InitialState = unknown;
94
- // type IWhenShape = any;
95
- // type IThenShape = any;
96
- // type ISelection = string;
97
- // type IStore = string;
98
- // type ISubject = string
99
-
100
- // export default <ITestShape extends ITTestShape>(
101
- // testImplementations: ITestImplementation<
102
- // InitialState,
103
- // ISelection,
104
- // IWhenShape,
105
- // IThenShape,
106
- // ITestShape
107
- // >,
108
- // testSpecifications: ITestSpecification<
109
- // ITestShape,
110
- // ISubject,
111
- // IStore,
112
- // ISelection,
113
- // IThenShape
114
- // >,
115
- // testInput: IInput
116
- // ) => {
117
- // return Testeranto<
118
- // ITestShape,
119
- // IInput,
120
- // ISubject,
121
- // IStore,
122
- // ISelection,
123
- // IThenShape,
124
- // IWhenShape,
125
- // InitialState
126
- // >(
127
- // testInput,
128
- // testSpecifications,
129
- // testImplementations,
130
- // {
131
- // beforeEach: async (
132
- // element,
133
- // ndx,
134
- // testResource,
135
- // artificer
136
- // ): Promise<IStore> => {
137
- // return new Promise((resolve, rej) => {
138
- // resolve(ReactDOMServer.renderToStaticMarkup(element));
139
- // });
140
- // },
141
- // andWhen: function (s: IStore, actioner): Promise<ISelection> {
142
- // throw new Error(`"andWhens" are not permitted`);
143
- // }
144
- // },
145
- // )
146
- // };
@@ -1,30 +0,0 @@
1
- import Testeranto from "../../../Node";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { IImpl, ISpec, IInput, testInterface } from ".";
6
-
7
- export default <
8
- ITestShape extends ITTestShape,
9
- IProps,
10
- IState
11
- >(
12
- testImplementations: IImpl<ITestShape, IProps>,
13
- testSpecifications: ISpec<ITestShape>,
14
- testInput: IInput<IProps, IState>,
15
- ) =>
16
- Testeranto<
17
- ITestShape,
18
- IInput<IProps, IState>,
19
- any,
20
- any,
21
- any,
22
- any,
23
- any,
24
- any
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface
30
- )
@@ -1,30 +0,0 @@
1
- import Testeranto from "../../../Web";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { IImpl, ISpec, IInput, testInterface } from ".";
6
-
7
- export default <
8
- ITestShape extends ITTestShape,
9
- IProps,
10
- IState
11
- >(
12
- testImplementations: IImpl<ITestShape, IProps>,
13
- testSpecifications: ISpec<ITestShape>,
14
- testInput: IInput<IProps, IState>,
15
- ) =>
16
- Testeranto<
17
- ITestShape,
18
- IInput<IProps, IState>,
19
- any,
20
- any,
21
- any,
22
- any,
23
- any,
24
- any
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface
30
- )
@@ -1,31 +0,0 @@
1
- import test from "../../../Node";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { testInterface } from "./index";
6
-
7
- import {
8
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState
9
- } from ".";
10
-
11
- export default <ITestShape extends ITTestShape>(
12
- testImplementations: ITestImpl<ITestShape>,
13
- testSpecifications: ITestSpec<ITestShape>,
14
- testInput: IInput
15
- ) => {
16
- return test<
17
- ITestShape,
18
- IInput,
19
- ISubject,
20
- IStore,
21
- ISelection,
22
- IThenShape,
23
- IWhenShape,
24
- InitialState
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface,
30
- )
31
- };
@@ -1,31 +0,0 @@
1
- import test from "../../../Web";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { testInterface } from "./index";
6
-
7
- import {
8
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState
9
- } from ".";
10
-
11
- export default <ITestShape extends ITTestShape>(
12
- testImplementations: ITestImpl<ITestShape>,
13
- testSpecifications: ITestSpec<ITestShape>,
14
- testInput: IInput
15
- ) => {
16
- return test<
17
- ITestShape,
18
- IInput,
19
- ISubject,
20
- IStore,
21
- ISelection,
22
- IThenShape,
23
- IWhenShape,
24
- InitialState
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface,
30
- )
31
- };
@@ -1,31 +0,0 @@
1
- import test from "../../../Node";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { testInterface } from "./index";
6
-
7
- import {
8
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState
9
- } from ".";
10
-
11
- export default <ITestShape extends ITTestShape>(
12
- testImplementations: ITestImpl<ITestShape>,
13
- testSpecifications: ITestSpec<ITestShape>,
14
- testInput: IInput
15
- ) => {
16
- return test<
17
- ITestShape,
18
- IInput,
19
- ISubject,
20
- IStore,
21
- ISelection,
22
- IThenShape,
23
- IWhenShape,
24
- InitialState
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface,
30
- )
31
- };
@@ -1,31 +0,0 @@
1
- import test from "../../../Web";
2
-
3
- import { ITTestShape } from "../../../core";
4
-
5
- import { testInterface } from "./index";
6
-
7
- import {
8
- ITestImpl, ITestSpec, IInput, ISubject, IStore, ISelection, IThenShape, IWhenShape, InitialState
9
- } from ".";
10
-
11
- export default <ITestShape extends ITTestShape>(
12
- testImplementations: ITestImpl<ITestShape>,
13
- testSpecifications: ITestSpec<ITestShape>,
14
- testInput: IInput
15
- ) => {
16
- return test<
17
- ITestShape,
18
- IInput,
19
- ISubject,
20
- IStore,
21
- ISelection,
22
- IThenShape,
23
- IWhenShape,
24
- InitialState
25
- >(
26
- testInput,
27
- testSpecifications,
28
- testImplementations,
29
- testInterface,
30
- )
31
- };