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,87 +0,0 @@
1
- import Testeranto from "../../../Node";
2
- import { createElement } from "react";
3
- import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
4
- import Stream from 'stream';
5
- export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
6
- export default (testImplementations, testSpecifications, testInput) => {
7
- return Testeranto(testInput, testSpecifications, testImplementations, {
8
- beforeAll: async (prototype, artificer) => {
9
- return await new Promise((resolve, rej) => {
10
- resolve();
11
- });
12
- },
13
- beforeEach: async (reactComponent, ndx, testRsource, artificer) => {
14
- return new Promise((resolve, rej) => {
15
- // Ignore these type errors
16
- resolve(createElement(testInput));
17
- });
18
- },
19
- andWhen: async function (s, actioner) {
20
- // return actioner()(s);
21
- return s;
22
- },
23
- butThen: async function (s) {
24
- return s;
25
- },
26
- afterEach: async function (store, ndx, artificer) {
27
- return {};
28
- },
29
- afterAll: (store, artificer) => {
30
- return;
31
- },
32
- });
33
- };
34
- // type IInput = typeof React.Component;
35
- // type InitialState = unknown;
36
- // type IWhenShape = any;
37
- // type IThenShape = any;
38
- // type ISelection = string;
39
- // type IStore = string;
40
- // type ISubject = string
41
- // export default <ITestShape extends ITTestShape>(
42
- // testImplementations: ITestImplementation<
43
- // InitialState,
44
- // ISelection,
45
- // IWhenShape,
46
- // IThenShape,
47
- // ITestShape
48
- // >,
49
- // testSpecifications: ITestSpecification<
50
- // ITestShape,
51
- // ISubject,
52
- // IStore,
53
- // ISelection,
54
- // IThenShape
55
- // >,
56
- // testInput: IInput
57
- // ) => {
58
- // return Testeranto<
59
- // ITestShape,
60
- // IInput,
61
- // ISubject,
62
- // IStore,
63
- // ISelection,
64
- // IThenShape,
65
- // IWhenShape,
66
- // InitialState
67
- // >(
68
- // testInput,
69
- // testSpecifications,
70
- // testImplementations,
71
- // {
72
- // beforeEach: async (
73
- // element,
74
- // ndx,
75
- // testResource,
76
- // artificer
77
- // ): Promise<IStore> => {
78
- // return new Promise((resolve, rej) => {
79
- // resolve(ReactDOMServer.renderToStaticMarkup(element));
80
- // });
81
- // },
82
- // andWhen: function (s: IStore, actioner): Promise<ISelection> {
83
- // throw new Error(`"andWhens" are not permitted`);
84
- // }
85
- // },
86
- // )
87
- // };
@@ -1,5 +0,0 @@
1
- import test from "../../../Web";
2
- import { testInterface } from "./index";
3
- export default (testImplementations, testSpecifications, testInput) => {
4
- return test(testInput, testSpecifications, testImplementations, testInterface);
5
- };
@@ -1,5 +0,0 @@
1
- import test from "../../../Node";
2
- import { testInterface } from "./index";
3
- export default (testImplementations, testSpecifications, testInput) => {
4
- return test(testInput, testSpecifications, testImplementations, testInterface);
5
- };
@@ -1,220 +0,0 @@
1
- export declare type IImplementer<IImplementation> = {
2
- name: string;
3
- fs: string;
4
- ports: number[];
5
- };
6
- export declare type ITTestResourceConfiguration = {
7
- name: string;
8
- fs: string;
9
- ports: number[];
10
- scheduled: boolean;
11
- };
12
- export declare type ITTestResourceRequirement = {
13
- name: string;
14
- ports: number;
15
- fs: string;
16
- };
17
- export declare type ITTestResourceRequest = {
18
- ports: number;
19
- };
20
- export declare type Modify<Type, Replace> = Omit<Type, keyof Replace> & Replace;
21
- export declare type ITTestShape = {
22
- suites: any;
23
- givens: any;
24
- whens: any;
25
- thens: any;
26
- checks: any;
27
- };
28
- export declare type ILogWriter = {
29
- createWriteStream: (line: string) => any | any;
30
- writeFileSync: (fp: string, contents: string) => any;
31
- mkdirSync: (fp: string) => any;
32
- testArtiFactoryfileWriter: (tLog: ITLog, n: (Promise: any) => void) => (fPath: string, value: unknown) => void;
33
- };
34
- declare type IGivens<ISubject, IStore, ISelection, IThenShape> = Record<string, BaseGiven<ISubject, IStore, ISelection, IThenShape>>;
35
- declare type ITestCheckCallback<ITestShape extends ITTestShape> = {
36
- [K in keyof ITestShape["checks"]]: (name: string, features: string[], callbackA: (whens: {
37
- [K in keyof ITestShape["whens"]]: (...unknown: any[]) => BaseWhen<unknown, unknown, unknown>;
38
- }, thens: {
39
- [K in keyof ITestShape["thens"]]: (...unknown: any[]) => BaseThen<unknown, unknown, unknown>;
40
- }) => Promise<any>, ...xtrasA: ITestShape["checks"][K]) => BaseCheck<unknown, unknown, unknown, unknown, ITestShape>;
41
- };
42
- export declare type ITestArtificer = (key: string, data: any) => void;
43
- export declare type IRunTimeAndSubject = {
44
- runtime: "just node" | "just web" | "both web and node";
45
- entrypoint: string;
46
- };
47
- declare type IRunner = (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<any, any, any, any, any, any>>;
48
- export declare type IT = {
49
- toObj(): object;
50
- name: string;
51
- givens: IGivens<unknown, unknown, unknown, unknown>;
52
- checks: BaseCheck<unknown, unknown, unknown, unknown, ITTestShape>[];
53
- testResourceConfiguration: ITTestResourceConfiguration;
54
- };
55
- export declare type ITestJob = {
56
- toObj(): object;
57
- test: IT;
58
- runner: IRunner;
59
- testResourceRequirement: ITTestResourceRequirement;
60
- receiveTestResourceConfig: (testResource?: any) => Promise<{
61
- failed: number;
62
- artifacts: Promise<unknown>[];
63
- logPromise: Promise<unknown>;
64
- }>;
65
- };
66
- export declare type ITestResults = Promise<{
67
- test: IT;
68
- }>[];
69
- export declare const defaultTestResourceRequirement: ITTestResourceRequest;
70
- export declare type ITestArtifactory = (key: string, value: unknown) => unknown;
71
- export declare type ITLog = (...string: any[]) => void;
72
- export declare abstract class BaseSuite<IInput, ISubject, IStore, ISelection, IThenShape, ITestShape extends ITTestShape> {
73
- name: string;
74
- givens: IGivens<ISubject, IStore, ISelection, IThenShape>;
75
- checks: BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>[];
76
- store: IStore;
77
- fails: BaseGiven<ISubject, IStore, ISelection, IThenShape>[];
78
- testResourceConfiguration: ITTestResourceConfiguration;
79
- index: number;
80
- constructor(name: string, index: number, givens?: IGivens<ISubject, IStore, ISelection, IThenShape>, checks?: BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>[]);
81
- toObj(): {
82
- name: string;
83
- givens: {
84
- name: string;
85
- whens: {
86
- name: string;
87
- error: boolean;
88
- }[];
89
- thens: {
90
- name: string;
91
- error: boolean;
92
- }[];
93
- error: (string | Error | undefined)[] | null;
94
- features: string[];
95
- }[];
96
- fails: BaseGiven<ISubject, IStore, ISelection, IThenShape>[];
97
- };
98
- setup(s: IInput, artifactory: ITestArtifactory): Promise<ISubject>;
99
- test(t: IThenShape): unknown;
100
- run(input: any, testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void): Promise<BaseSuite<IInput, ISubject, IStore, ISelection, IThenShape, ITestShape>>;
101
- }
102
- export declare abstract class BaseGiven<ISubject, IStore, ISelection, IThenShape> {
103
- name: string;
104
- features: string[];
105
- whens: BaseWhen<IStore, ISelection, IThenShape>[];
106
- thens: BaseThen<ISelection, IStore, IThenShape>[];
107
- error: Error;
108
- store: IStore;
109
- recommendedFsPath: string;
110
- constructor(name: string, features: string[], whens: BaseWhen<IStore, ISelection, IThenShape>[], thens: BaseThen<ISelection, IStore, IThenShape>[]);
111
- beforeAll(store: IStore, artifactory: ITestArtifactory): IStore;
112
- afterAll(store: IStore, artifactory: ITestArtifactory): IStore;
113
- toObj(): {
114
- name: string;
115
- whens: {
116
- name: string;
117
- error: boolean;
118
- }[];
119
- thens: {
120
- name: string;
121
- error: boolean;
122
- }[];
123
- error: (string | Error | undefined)[] | null;
124
- features: string[];
125
- };
126
- abstract givenThat(subject: ISubject, testResourceConfiguration: any, artifactory: ITestArtifactory): Promise<IStore>;
127
- afterEach(store: IStore, key: string, artifactory: ITestArtifactory): Promise<unknown>;
128
- give(subject: ISubject, key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog): Promise<IStore>;
129
- }
130
- export declare abstract class BaseWhen<IStore, ISelection, IThenShape> {
131
- name: string;
132
- actioner: (x: ISelection) => IThenShape;
133
- error: boolean;
134
- constructor(name: string, actioner: (xyz: ISelection) => IThenShape);
135
- abstract andWhen(store: IStore, actioner: (x: ISelection) => IThenShape, testResource: any): any;
136
- toObj(): {
137
- name: string;
138
- error: boolean;
139
- };
140
- test(store: IStore, testResourceConfiguration: any, tLog: ITLog): Promise<any>;
141
- }
142
- export declare abstract class BaseThen<ISelection, IStore, IThenShape> {
143
- name: string;
144
- thenCB: (storeState: ISelection) => IThenShape;
145
- error: boolean;
146
- constructor(name: string, thenCB: (val: ISelection) => IThenShape);
147
- toObj(): {
148
- name: string;
149
- error: boolean;
150
- };
151
- abstract butThen(store: any, testResourceConfiguration?: any): Promise<ISelection>;
152
- test(store: IStore, testResourceConfiguration: any, tLog: ITLog): Promise<IThenShape | undefined>;
153
- }
154
- export declare abstract class BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape extends ITTestShape> {
155
- name: string;
156
- features: string[];
157
- checkCB: (whens: any, thens: any) => any;
158
- whens: {
159
- [K in keyof ITestShape["whens"]]: (p: any, tc: any) => BaseWhen<IStore, ISelection, IThenShape>;
160
- };
161
- thens: {
162
- [K in keyof ITestShape["thens"]]: (p: any, tc: any) => BaseThen<ISelection, IStore, IThenShape>;
163
- };
164
- constructor(name: string, features: string[], checkCB: (whens: any, thens: any) => any, whens: any, thens: any);
165
- abstract checkThat(subject: ISubject, testResourceConfiguration: any, artifactory: ITestArtifactory): Promise<IStore>;
166
- afterEach(store: IStore, key: string, cb?: any): Promise<unknown>;
167
- check(subject: ISubject, key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog): Promise<void>;
168
- }
169
- declare abstract class TesterantoLevelOne<ITestShape extends ITTestShape, IInitialState, ISelection, IStore, ISubject, IWhenShape, IThenShape, IInput> {
170
- artifacts: Promise<unknown>[];
171
- testJobs: ITestJob[];
172
- constructor(testImplementation: ITestImplementation<IInitialState, ISelection, IWhenShape, IThenShape, ITestShape>, testSpecification: (Suite: {
173
- [K in keyof ITestShape["suites"]]: (feature: string, givens: IGivens<ISubject, IStore, ISelection, IThenShape>, checks: BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>[]) => BaseSuite<IInput, ISubject, IStore, ISelection, IThenShape, ITestShape>;
174
- }, Given: {
175
- [K in keyof ITestShape["givens"]]: (features: string[], whens: BaseWhen<IStore, ISelection, IThenShape>[], thens: BaseThen<ISelection, IStore, IThenShape>[], ...a: ITestShape["givens"][K]) => BaseGiven<ISubject, IStore, ISelection, IThenShape>;
176
- }, When: {
177
- [K in keyof ITestShape["whens"]]: (...a: ITestShape["whens"][K]) => BaseWhen<IStore, ISelection, IThenShape>;
178
- }, Then: {
179
- [K in keyof ITestShape["thens"]]: (...a: ITestShape["thens"][K]) => BaseThen<ISelection, IStore, IThenShape>;
180
- }, Check: ITestCheckCallback<ITestShape>, logWriter: ILogWriter) => BaseSuite<IInput, ISubject, IStore, ISelection, IThenShape, ITestShape>[], input: IInput, suiteKlasser: (name: string, index: number, givens: IGivens<ISubject, IStore, ISelection, IThenShape>, checks: BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>[]) => BaseSuite<IInput, ISubject, IStore, ISelection, IThenShape, ITestShape>, givenKlasser: (n: any, f: any, w: any, t: any, z?: any) => BaseGiven<ISubject, IStore, ISelection, IThenShape>, whenKlasser: (s: any, o: any) => BaseWhen<IStore, ISelection, IThenShape>, thenKlasser: (s: any, o: any) => BaseThen<IStore, ISelection, IThenShape>, checkKlasser: (n: any, f: any, cb: any, w: any, t: any) => BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>, testResourceRequirement: any, logWriter: ILogWriter);
181
- }
182
- export default class TesterantoLevelTwo<TestShape extends ITTestShape, IState, ISelection, IStore, ISubject, WhenShape, ThenShape, IInput> extends TesterantoLevelOne<TestShape, IState, ISelection, IStore, ISubject, WhenShape, ThenShape, IInput> {
183
- constructor(input: IInput, testSpecification: ITestSpecification<TestShape, ISubject, IStore, ISelection, ThenShape>, testImplementation: any, testInterface: {
184
- actionHandler?: (b: (...any: any[]) => any) => any;
185
- andWhen: (store: IStore, actioner: any, testResource: ITTestResourceConfiguration) => Promise<ISelection>;
186
- butThen?: (store: IStore, callback: any, testResource: ITTestResourceConfiguration) => Promise<ISelection>;
187
- assertioner?: (t: ThenShape) => any;
188
- afterAll?: (store: IStore, artificer: ITestArtificer) => any;
189
- afterEach?: (store: IStore, key: string, artificer: ITestArtificer) => Promise<unknown>;
190
- beforeAll?: (input: IInput, artificer: ITestArtificer, testResource: ITTestResourceConfiguration) => Promise<ISubject>;
191
- beforeEach?: (subject: ISubject, initialValues: any, testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<IStore>;
192
- }, testResourceRequirement: ITTestResourceRequest | undefined, assertioner: (t: ThenShape) => any, beforeEach: (subject: ISubject, initialValues: any, testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<IStore>, afterEach: (store: IStore, key: string, artificer: ITestArtificer) => Promise<unknown>, afterAll: (store: IStore, artificer: ITestArtificer) => any, butThen: (s: IStore, bt: (storeState: ISelection) => ThenShape, testResource: ITTestResourceConfiguration) => any, andWhen: (store: IStore, actioner: any, testResource: ITTestResourceConfiguration) => Promise<ISelection>, actionHandler: (b: (...any: any[]) => any) => any, logWriter: ILogWriter);
193
- }
194
- export declare type ITestSpecification<ITestShape extends ITTestShape, ISubject, IStore, ISelection, IThenShape> = (Suite: {
195
- [K in keyof ITestShape["suites"]]: (name: string, givens: IGivens<ISubject, IStore, ISelection, IThenShape>, checks: BaseCheck<ISubject, IStore, ISelection, IThenShape, ITestShape>[]) => BaseSuite<unknown, ISubject, IStore, ISelection, IThenShape, ITestShape>;
196
- }, Given: {
197
- [K in keyof ITestShape["givens"]]: (features: string[], whens: BaseWhen<IStore, ISelection, IThenShape>[], thens: BaseThen<ISelection, IStore, IThenShape>[], ...xtrasB: ITestShape["givens"][K]) => BaseGiven<ISubject, IStore, ISelection, IThenShape>;
198
- }, When: {
199
- [K in keyof ITestShape["whens"]]: (...xtrasC: ITestShape["whens"][K]) => BaseWhen<IStore, ISelection, IThenShape>;
200
- }, Then: {
201
- [K in keyof ITestShape["thens"]]: (...xtrasD: ITestShape["thens"][K]) => BaseThen<ISelection, IStore, IThenShape>;
202
- }, Check: ITestCheckCallback<ITestShape>) => any[];
203
- export declare type ITestImplementation<IState, ISelection, IWhenShape, IThenShape, ITestShape extends ITTestShape> = {
204
- Suites: {
205
- [K in keyof ITestShape["suites"]]: string;
206
- };
207
- Givens: {
208
- [K in keyof ITestShape["givens"]]: (...Ig: ITestShape["givens"][K]) => IState;
209
- };
210
- Whens: {
211
- [K in keyof ITestShape["whens"]]: (...Iw: ITestShape["whens"][K]) => (zel: ISelection) => IWhenShape;
212
- };
213
- Thens: {
214
- [K in keyof ITestShape["thens"]]: (...It: ITestShape["thens"][K]) => (ssel: ISelection) => IThenShape;
215
- };
216
- Checks: {
217
- [K in keyof ITestShape["checks"]]: (...Ic: ITestShape["checks"][K]) => IState;
218
- };
219
- };
220
- export {};
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
3
- declare type IWhenShape = any;
4
- declare type IThenShape = any;
5
- declare type IInput = typeof React.Component;
6
- declare type ISelection = React.CElement<any, any>;
7
- declare type IStore = React.CElement<any, any>;
8
- declare type ISubject = React.CElement<any, any>;
9
- export declare type IImpl<ISpec extends ITTestShape, IState> = ITestImplementation<IState, ISelection, IWhenShape, IThenShape, ISpec>;
10
- export declare type ISpec<T extends ITTestShape> = ITestSpecification<T, ISubject, IStore, ISelection, IThenShape>;
11
- declare const _default: <ITestShape extends ITTestShape, IState>(testImplementations: ITestImplementation<IState, ISelection, any, any, ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<void>;
12
- export default _default;
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
3
- declare type IWhenShape = any;
4
- declare type IThenShape = any;
5
- declare type IInput = typeof React.Component;
6
- declare type ISelection = React.CElement<any, any>;
7
- declare type Store = React.CElement<any, any>;
8
- declare type Subject = React.CElement<any, any>;
9
- export declare type IImpl<ISpec extends ITTestShape, IState> = ITestImplementation<IState, ISelection, IWhenShape, IThenShape, ISpec>;
10
- export declare type ISpec<T extends ITTestShape> = ITestSpecification<T, Subject, Store, ISelection, IThenShape>;
11
- declare const _default: <ITestShape extends ITTestShape, IState>(testImplementations: ITestImplementation<IState, ISelection, any, any, ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<void>;
12
- export default _default;
@@ -1,15 +0,0 @@
1
- import { CElement } from "react";
2
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
3
- export declare type IWhenShape = any;
4
- export declare type IThenShape = any;
5
- export declare type InitialState = unknown;
6
- export declare type IInput = () => JSX.Element;
7
- export declare type ISelection = CElement<any, any>;
8
- export declare type IStore = CElement<any, any>;
9
- export declare type ISubject = CElement<any, any>;
10
- export declare type ITestImpl<ITestShape extends ITTestShape> = ITestImplementation<InitialState, ISelection, IWhenShape, IThenShape, ITestShape>;
11
- export declare type ITestSpec<ITestShape extends ITTestShape> = ITestSpecification<ITestShape, ISubject, IStore, ISelection, IThenShape>;
12
- export declare const testInterface: (testInput: any) => {
13
- beforeEach: (x: any, ndx: any, testRsource: any, artificer: any) => Promise<IStore>;
14
- andWhen: (s: IStore, actioner: any) => Promise<ISelection>;
15
- };
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;
@@ -1,19 +0,0 @@
1
- import React, { CElement } from "react";
2
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
3
- declare type IInput = typeof React.Component;
4
- declare type InitialState = unknown;
5
- declare type IWhenShape = any;
6
- declare type IThenShape = any;
7
- declare type ISelection = {
8
- htmlElement: HTMLElement;
9
- reactElement: CElement<any, any>;
10
- };
11
- declare type IStore = {
12
- htmlElement: HTMLElement;
13
- reactElement: CElement<any, any>;
14
- };
15
- declare type ISubject = {
16
- htmlElement: HTMLElement;
17
- };
18
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImplementation<unknown, ISelection, any, any, ITestShape>, testSpecifications: ITestSpecification<ITestShape, ISubject, IStore, ISelection, any>, testInput: IInput) => void;
19
- export default _default;
@@ -1,8 +0,0 @@
1
- import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
2
- import Stream from 'stream';
3
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
4
- import { IInput, ISelection, IStore, IThenShape, IWhenShape, IState } from ".";
5
- export declare type ISubject = void;
6
- export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
7
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImplementation<unknown, HTMLElement, any, any, ITestShape>, testSpecifications: ITestSpecification<ITestShape, void, HTMLElement, HTMLElement, any>, testInput: IInput) => Promise<void>;
8
- export default _default;
@@ -1,5 +0,0 @@
1
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
2
- import { IInput, ISelection, IStore, IThenShape, IWhenShape, IState } from ".";
3
- export declare type ISubject = HTMLElement;
4
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImplementation<unknown, HTMLElement, any, any, ITestShape>, testSpecifications: ITestSpecification<ITestShape, HTMLElement, HTMLElement, HTMLElement, any>, testInput: IInput) => void;
5
- export default _default;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import renderer from "react-test-renderer";
3
- import { ITestImplementation, ITestSpecification, ITTestShape } from "../../../core";
4
- declare type Input = React.MemoExoticComponent<() => JSX.Element>;
5
- declare type WhenShape = unknown;
6
- declare type ThenShape = unknown;
7
- declare const _default: <ITestShape extends ITTestShape, PropShape>(testImplementations: ITestImplementation<PropShape, renderer.ReactTestRenderer, unknown, unknown, ITestShape>, testSpecifications: ITestSpecification<ITestShape, any, any, any, any>, testInput: Input) => Promise<void>;
8
- export default _default;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { ITTestShape } from "../../../core";
3
- import { IImpl, ISpec, IInput } from ".";
4
- declare const _default: <ITestShape extends ITTestShape, IProps, IState>(testImplementations: IImpl<ITestShape, IProps>, testSpecifications: ISpec<ITestShape>, testInput: {
5
- new (props: IProps | Readonly<IProps>): import("react").Component<IProps, IState, any>;
6
- new (props: IProps, context: any): import("react").Component<IProps, IState, any>;
7
- contextType?: import("react").Context<any> | undefined;
8
- }) => Promise<void>;
9
- export default _default;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { ITTestShape } from "../../../core";
3
- import { IImpl, ISpec, IInput } from ".";
4
- declare const _default: <ITestShape extends ITTestShape, IProps, IState>(testImplementations: IImpl<ITestShape, IProps>, testSpecifications: ISpec<ITestShape>, testInput: {
5
- new (props: IProps | Readonly<IProps>): import("react").Component<IProps, IState, any>;
6
- new (props: IProps, context: any): import("react").Component<IProps, IState, any>;
7
- contextType?: import("react").Context<any> | undefined;
8
- }) => Promise<void>;
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import renderer from "react-test-renderer";
3
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
4
- export declare type IInput = React.FC;
5
- export declare type IWhenShape = unknown;
6
- export declare type IThenShape = unknown;
7
- export declare type ISpec<ITestShape extends ITTestShape> = ITestSpecification<ITestShape, any, any, any, IThenShape>;
8
- declare const _default: <ITestShape extends ITTestShape, IPropShape>(testImplementations: ITestImplementation<IPropShape, renderer.ReactTestRenderer, unknown, unknown, ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<void>;
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import renderer from "react-test-renderer";
3
- import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
4
- export declare type IInput = React.FC;
5
- export declare type IWhenShape = unknown;
6
- export declare type IThenShape = unknown;
7
- export declare type ISpec<ITestShape extends ITTestShape> = ITestSpecification<ITestShape, any, any, any, IThenShape>;
8
- declare const _default: <ITestShape extends ITTestShape, IPropShape>(testImplementations: ITestImplementation<IPropShape, renderer.ReactTestRenderer, unknown, unknown, ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<void>;
9
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ITTestShape } from "../../../core";
2
- import { ITestImpl, ITestSpec, IInput } from ".";
3
- declare const _default: <ITestShape extends ITTestShape>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<void>;
4
- export default _default;