testeranto 0.47.34 → 0.47.52
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.
- package/.nvmrc +1 -0
- package/Bundle.Dockerfile +45 -0
- package/README.md +86 -11
- package/Report.Dockerfile +43 -0
- package/dist/cjs-shim.js +12 -0
- package/dist/common/Features.js +3 -37
- package/dist/common/Init.js +30 -0
- package/dist/common/Node.js +15 -66
- package/dist/common/PM/index.js +7 -0
- package/dist/common/PM/main.js +641 -0
- package/dist/common/PM/node.js +88 -0
- package/dist/common/PM/web.js +132 -0
- package/dist/common/Project.js +109 -637
- package/dist/common/Puppeteer.js +103 -0
- package/dist/common/Reporter.js +112 -0
- package/dist/common/Scheduler.js +1 -0
- package/dist/common/SubPackages/puppeteer.js +21 -0
- package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
- package/dist/common/SubPackages/react/jsx/index.js +25 -0
- package/dist/common/SubPackages/react/jsx/node.js +10 -0
- package/dist/common/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{subPackages/react-dom/jsx → SubPackages/react-dom/component}/node.js +6 -6
- package/dist/common/SubPackages/react-dom/component/web.js +93 -0
- package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
- package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
- package/dist/common/SubPackages/react-dom/jsx/web.js +118 -0
- package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +44 -0
- package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
- package/dist/common/{subPackages/react-test-renderer/component/index.js → SubPackages/react-test-renderer/component/interface.js} +23 -33
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
- package/dist/common/SubPackages/react-test-renderer/fc/node.js +50 -0
- package/dist/common/SubPackages/react-test-renderer/fc/web.js +50 -0
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
- package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +42 -0
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
- package/dist/common/TaskManBackEnd.js +174 -0
- package/dist/common/Web.js +31 -108
- package/dist/common/esbuildConfigs/features.js +14 -0
- package/dist/common/esbuildConfigs/index.js +21 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
- package/dist/common/esbuildConfigs/node.js +39 -0
- package/dist/common/esbuildConfigs/report.js +14 -0
- package/dist/common/esbuildConfigs/tests.js +13 -0
- package/dist/common/esbuildConfigs/web.js +57 -0
- package/dist/common/lib/abstractBase.js +553 -0
- package/dist/common/lib/basebuilder.js +79 -0
- package/dist/common/lib/classBuilder.js +42 -0
- package/dist/common/lib/core.js +75 -0
- package/dist/common/lib/index.js +22 -0
- package/dist/common/lib/types.js +2 -0
- package/dist/common/mongooseSchemas.js +56 -0
- package/dist/common/preload.js +14 -27
- package/dist/common/puppeteerConfiger.js +24 -0
- package/dist/common/report.html.js +31 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +16 -0
- package/dist/common/web.html.js +22 -0
- package/dist/module/ExampleTab.js +112 -0
- package/dist/module/Features.js +2 -35
- package/dist/module/Init.js +25 -0
- package/dist/module/Node.js +15 -66
- package/dist/module/PM/index.js +3 -0
- package/dist/module/PM/main.js +611 -0
- package/dist/module/PM/node.js +81 -0
- package/dist/module/PM/web.js +125 -0
- package/dist/module/Project.js +110 -615
- package/dist/module/Puppeteer.js +98 -0
- package/dist/module/Reporter.js +107 -0
- package/dist/module/Scheduler.js +1 -0
- package/dist/module/SubPackages/puppeteer.js +16 -0
- package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
- package/dist/module/SubPackages/react/jsx/index.js +19 -0
- package/dist/module/SubPackages/react/jsx/node.js +5 -0
- package/dist/module/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +7 -7
- package/dist/module/SubPackages/react-dom/component/web.js +88 -0
- package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
- package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
- package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
- package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
- package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
- package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
- package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
- package/dist/module/TaskManBackEnd.js +169 -0
- package/dist/module/TaskManFrontEnd.js +600 -0
- package/dist/module/Web.js +31 -108
- package/dist/module/esbuildConfigs/features.js +12 -0
- package/dist/module/esbuildConfigs/index.js +19 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
- package/dist/module/esbuildConfigs/node.js +34 -0
- package/dist/module/esbuildConfigs/report.js +14 -0
- package/dist/module/esbuildConfigs/tests.js +11 -0
- package/dist/module/esbuildConfigs/web.js +52 -0
- package/dist/module/lib/abstractBase.js +545 -0
- package/dist/module/lib/basebuilder.js +75 -0
- package/dist/module/lib/classBuilder.js +38 -0
- package/dist/module/lib/core.js +72 -0
- package/dist/module/lib/index.js +18 -0
- package/dist/module/lib/types.js +1 -0
- package/dist/module/mongooseSchemas.js +50 -0
- package/dist/module/preload.js +15 -26
- package/dist/module/puppeteerConfiger.js +19 -0
- package/dist/module/report.html.js +29 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +9 -0
- package/dist/module/web.html.js +20 -0
- package/dist/prebuild/TaskManBackEnd.mjs +174 -0
- package/dist/prebuild/TaskManFrontEnd.css +12301 -0
- package/dist/prebuild/TaskManFrontEnd.js +81264 -0
- package/dist/types/Features.d.ts +1 -34
- package/dist/types/Init.d.ts +2 -0
- package/dist/types/Node.d.ts +5 -11
- package/dist/types/PM/index.d.ts +20 -0
- package/dist/types/PM/main.d.ts +31 -0
- package/dist/types/PM/node.d.ts +27 -0
- package/dist/types/PM/web.d.ts +25 -0
- package/dist/types/Project.d.ts +3 -29
- package/dist/types/Puppeteer.d.ts +2 -0
- package/dist/types/Reporter.d.ts +1 -0
- package/dist/types/Scheduler.d.ts +0 -0
- package/dist/types/SubPackages/puppeteer.d.ts +6 -0
- package/dist/types/SubPackages/react/component/node.d.ts +7 -0
- package/dist/types/SubPackages/react/component/web.d.ts +7 -0
- package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
- package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/SubPackages/react-dom/component/node.d.ts +12 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +11 -0
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +3 -0
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
- package/dist/types/TaskManBackEnd.d.ts +3 -0
- package/dist/types/Types.d.ts +49 -16
- package/dist/types/Web.d.ts +5 -11
- package/dist/types/esbuildConfigs/features.d.ts +4 -0
- package/dist/types/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/esbuildConfigs/tests.d.ts +4 -0
- package/dist/types/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/lib/abstractBase.d.ts +104 -0
- package/dist/types/lib/basebuilder.d.ts +27 -0
- package/dist/types/lib/classBuilder.d.ts +7 -0
- package/dist/types/lib/core.d.ts +8 -0
- package/dist/types/lib/index.d.ts +59 -0
- package/dist/types/lib/types.d.ts +62 -0
- package/dist/types/mongooseSchemas.d.ts +124 -0
- package/dist/types/preload.d.ts +0 -1
- package/dist/types/puppeteerConfiger.d.ts +4 -0
- package/dist/types/report.html.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/web.html.d.ts +2 -0
- package/index.html +30 -0
- package/package.json +151 -79
- package/src/ExampleTab.tsx +219 -0
- package/src/Features.ts +2 -58
- package/src/Init.ts +51 -0
- package/src/Node.ts +71 -157
- package/src/PM/index.ts +25 -0
- package/src/PM/main.ts +830 -0
- package/src/PM/node.ts +128 -0
- package/src/PM/web.ts +166 -0
- package/src/Project.ts +158 -797
- package/src/Puppeteer.ts +141 -0
- package/src/Reporter.ts +126 -0
- package/src/Scheduler.ts +0 -0
- package/src/SubPackages/puppeteer.ts +51 -0
- package/src/SubPackages/react/component/node.ts +43 -0
- package/src/SubPackages/react/component/web.ts +43 -0
- package/src/SubPackages/react/jsx/index.ts +42 -0
- package/src/SubPackages/react/jsx/node.ts +26 -0
- package/src/SubPackages/react/jsx/web.ts +30 -0
- package/src/{subPackages → SubPackages}/react-dom/component/node.ts +24 -44
- package/src/SubPackages/react-dom/component/web.ts +143 -0
- package/src/SubPackages/react-dom/jsx/index.ts +6 -0
- package/src/SubPackages/react-dom/jsx/node.ts +68 -0
- package/src/SubPackages/react-dom/jsx/web.ts +139 -0
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +38 -0
- package/src/SubPackages/react-test-renderer/component/index.ts +23 -0
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +17 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +17 -0
- package/src/SubPackages/react-test-renderer/fc/node.ts +49 -0
- package/src/SubPackages/react-test-renderer/fc/web.ts +48 -0
- package/src/SubPackages/react-test-renderer/jsx/index.ts +48 -0
- package/src/SubPackages/react-test-renderer/jsx/node.ts +20 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +40 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
- package/src/TaskManBackEnd.ts +228 -0
- package/src/TaskManFrontEnd.tsx +1222 -0
- package/src/Types.ts +222 -17
- package/src/Web.ts +86 -217
- package/src/cjs-shim.js +12 -0
- package/src/esbuildConfigs/features.ts +17 -0
- package/src/esbuildConfigs/index.ts +23 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
- package/src/esbuildConfigs/node.ts +62 -0
- package/src/esbuildConfigs/report.ts +15 -0
- package/src/esbuildConfigs/tests.ts +14 -0
- package/src/esbuildConfigs/web.ts +79 -0
- package/src/lib/abstractBase.ts +910 -0
- package/src/lib/basebuilder.ts +214 -0
- package/src/lib/classBuilder.ts +131 -0
- package/src/lib/core.ts +224 -0
- package/src/lib/index.ts +226 -0
- package/src/lib/types.ts +303 -0
- package/src/mongooseSchemas.ts +105 -0
- package/src/preload.ts +14 -28
- package/src/puppeteerConfiger.ts +26 -0
- package/src/report.html.ts +29 -0
- package/src/utils.ts +15 -0
- package/src/web.html.ts +20 -0
- package/tests/Rectangle.test.ts +189 -0
- package/trash/TaskMan.Dockerfile +23 -0
- package/trash/TaskMan1.Dockerfile +43 -0
- package/trash/devBot.dockerfile +12 -0
- package/trash/docker-compose-dev.yml +9 -0
- package/trash/docker-compose-prod.yml +18 -0
- package/trash/electronBuild.ts +32 -0
- package/tsconfig.json +18 -6
- package/tsconfig.module.json +14 -4
- package/tsconfig.types.json +13 -4
- package/dist/common/NodeWriter.js +0 -56
- package/dist/common/core.js +0 -396
- package/dist/common/electron.js +0 -52
- package/dist/common/subPackages/react/jsx/index.js +0 -26
- package/dist/common/subPackages/react-dom/component/node.js +0 -101
- package/dist/common/subPackages/react-dom/component/web.js +0 -61
- package/dist/common/subPackages/react-dom/jsx/web.js +0 -76
- package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
- package/dist/module/NodeWriter.js +0 -50
- package/dist/module/Report.js +0 -186
- package/dist/module/core.js +0 -387
- package/dist/module/electron.js +0 -47
- package/dist/module/subPackages/react/jsx/index.js +0 -22
- package/dist/module/subPackages/react/jsx/node.js +0 -5
- package/dist/module/subPackages/react/jsx/web.js +0 -5
- package/dist/module/subPackages/react-dom/component/web.js +0 -56
- package/dist/module/subPackages/react-dom/jsx/node.js +0 -93
- package/dist/module/subPackages/react-dom/jsx/web.js +0 -48
- package/dist/module/subPackages/react-test-renderer/component/index.js +0 -52
- package/dist/types/NodeWriter.d.ts +0 -2
- package/dist/types/core.d.ts +0 -220
- package/dist/types/subPackages/react/component/node.d.ts +0 -12
- package/dist/types/subPackages/react/component/web.d.ts +0 -12
- package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
- package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-dom/component/node.d.ts +0 -14
- package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
- package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -14
- package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -15
- package/dist/types/subPackages/react-test-renderer/component/index.d.ts +0 -20
- package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/src/NodeWriter.ts +0 -72
- package/src/Report.tsx +0 -392
- package/src/core.ts +0 -1396
- package/src/electron.ts +0 -59
- package/src/subPackages/react/component/node.ts +0 -75
- package/src/subPackages/react/component/web.ts +0 -80
- package/src/subPackages/react/jsx/index.ts +0 -64
- package/src/subPackages/react/jsx/node.ts +0 -29
- package/src/subPackages/react/jsx/web.ts +0 -29
- package/src/subPackages/react-dom/component/web.ts +0 -129
- package/src/subPackages/react-dom/jsx/node.ts +0 -150
- package/src/subPackages/react-dom/jsx/web.ts +0 -117
- package/src/subPackages/react-test-renderer/component/index.ts +0 -101
- package/src/subPackages/react-test-renderer/component/node.ts +0 -30
- package/src/subPackages/react-test-renderer/component/web.ts +0 -30
- package/src/subPackages/react-test-renderer/fc/node.tsx +0 -77
- package/src/subPackages/react-test-renderer/jsx/index.ts +0 -51
- package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
- /package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
- /package/dist/{types/electron.d.ts → module/SubPackages/react-dom/jsx/index.js} +0 -0
- /package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
useEffect, useRef,
|
|
3
|
-
} from "react";
|
|
4
|
-
import ReactDom from "react-dom/client";
|
|
5
|
-
|
|
6
|
-
import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
|
|
7
|
-
import Testeranto from "../../../../src/Web";
|
|
8
|
-
|
|
9
|
-
type Input = [string, (string) => string, any];
|
|
10
|
-
type InitialState = unknown;
|
|
11
|
-
type IWhenShape = any;
|
|
12
|
-
type IThenShape = any;
|
|
13
|
-
type ISelection = IStore;
|
|
14
|
-
|
|
15
|
-
type Prototype = () => JSX.Element;
|
|
16
|
-
type IStore = {
|
|
17
|
-
root: HTMLElement,
|
|
18
|
-
react: HTMLElement,
|
|
19
|
-
};
|
|
20
|
-
type ISubject = {
|
|
21
|
-
root: HTMLElement
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default <ITestShape extends ITTestShape>(
|
|
25
|
-
testImplementations: ITestImplementation<
|
|
26
|
-
InitialState,
|
|
27
|
-
ISelection,
|
|
28
|
-
IWhenShape,
|
|
29
|
-
IThenShape,
|
|
30
|
-
ITestShape
|
|
31
|
-
>,
|
|
32
|
-
testSpecifications: ITestSpecification<
|
|
33
|
-
ITestShape,
|
|
34
|
-
ISubject,
|
|
35
|
-
IStore,
|
|
36
|
-
ISelection,
|
|
37
|
-
IThenShape
|
|
38
|
-
>,
|
|
39
|
-
testInput: Prototype
|
|
40
|
-
) => {
|
|
41
|
-
const TesterantoComponent = function (props) {
|
|
42
|
-
const myContainer = useRef(null);
|
|
43
|
-
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
console.log(
|
|
46
|
-
"This only happens ONCE. It happens AFTER the initial render."
|
|
47
|
-
);
|
|
48
|
-
// eslint-disable-next-line react/prop-types
|
|
49
|
-
props.done(myContainer.current);
|
|
50
|
-
}, []);
|
|
51
|
-
|
|
52
|
-
return React.createElement('div', { ref: myContainer }, testInput()); //testInput();
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return Testeranto<
|
|
56
|
-
ITestShape,
|
|
57
|
-
Prototype,
|
|
58
|
-
ISubject,
|
|
59
|
-
IStore,
|
|
60
|
-
ISelection,
|
|
61
|
-
IThenShape,
|
|
62
|
-
IWhenShape,
|
|
63
|
-
InitialState
|
|
64
|
-
>(
|
|
65
|
-
testInput,
|
|
66
|
-
testSpecifications,
|
|
67
|
-
testImplementations,
|
|
68
|
-
{
|
|
69
|
-
beforeAll: async (
|
|
70
|
-
prototype,
|
|
71
|
-
artificer
|
|
72
|
-
): Promise<ISubject> => {
|
|
73
|
-
artificer("./before.txt", "hello artificer");
|
|
74
|
-
return await new Promise((resolve, rej) => {
|
|
75
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
76
|
-
const elem = document.getElementById("root");
|
|
77
|
-
if (elem) {
|
|
78
|
-
resolve({ root: elem });
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
})
|
|
82
|
-
},
|
|
83
|
-
beforeEach: async (
|
|
84
|
-
{ root },
|
|
85
|
-
ndx,
|
|
86
|
-
testRsource,
|
|
87
|
-
artificer
|
|
88
|
-
): Promise<IStore> => {
|
|
89
|
-
return new Promise((resolve, rej) => {
|
|
90
|
-
ReactDom.createRoot(root).
|
|
91
|
-
render(
|
|
92
|
-
React.createElement(
|
|
93
|
-
TesterantoComponent, {
|
|
94
|
-
done: (react) => resolve({ root, react })
|
|
95
|
-
}, []));
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
andWhen: function (s: IStore, actioner): Promise<ISelection> {
|
|
99
|
-
return actioner()(s);
|
|
100
|
-
},
|
|
101
|
-
butThen: async function (s: IStore): Promise<ISelection> {
|
|
102
|
-
return s;
|
|
103
|
-
},
|
|
104
|
-
afterEach: async function (
|
|
105
|
-
store: IStore,
|
|
106
|
-
ndx,
|
|
107
|
-
artificer
|
|
108
|
-
) {
|
|
109
|
-
return {};
|
|
110
|
-
},
|
|
111
|
-
afterAll: (store: IStore, artificer) => {
|
|
112
|
-
// store.page.browser().close();
|
|
113
|
-
return;
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
)
|
|
117
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
|
|
4
|
-
import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
|
|
5
|
-
|
|
6
|
-
export type ISuper<T> = T extends infer U ? U : object;
|
|
7
|
-
|
|
8
|
-
// export type IInput<P, S> = React.Component<P, S>
|
|
9
|
-
export type IInput<P, S> = typeof React.Component<P, S>;
|
|
10
|
-
export type InitialState = unknown;
|
|
11
|
-
export type IWhenShape = any;
|
|
12
|
-
export type IThenShape = any;
|
|
13
|
-
export type ISelection = renderer.ReactTestRenderer;
|
|
14
|
-
export type IStore = renderer.ReactTestRenderer;
|
|
15
|
-
export type ISubject = renderer.ReactTestRenderer;
|
|
16
|
-
|
|
17
|
-
export type IImpl<
|
|
18
|
-
ITestShape extends ITTestShape,
|
|
19
|
-
IProps
|
|
20
|
-
> = ITestImplementation<
|
|
21
|
-
IProps,
|
|
22
|
-
renderer.ReactTestRenderer,
|
|
23
|
-
IWhenShape,
|
|
24
|
-
IThenShape,
|
|
25
|
-
ITestShape
|
|
26
|
-
>
|
|
27
|
-
export type ISpec<
|
|
28
|
-
ITestShape extends ITTestShape
|
|
29
|
-
> = ITestSpecification<
|
|
30
|
-
ITestShape,
|
|
31
|
-
ISubject,
|
|
32
|
-
IStore,
|
|
33
|
-
ISelection,
|
|
34
|
-
IThenShape
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
// export const testInterface = {
|
|
38
|
-
// beforeEach: function (CComponent, props): Promise<renderer.ReactTestRenderer> {
|
|
39
|
-
// return new Promise((res, rej) => {
|
|
40
|
-
// let component: renderer.ReactTestRenderer;
|
|
41
|
-
// act(() => {
|
|
42
|
-
// component = renderer.create(
|
|
43
|
-
// CComponent(props)
|
|
44
|
-
// );
|
|
45
|
-
// res(component);
|
|
46
|
-
// });
|
|
47
|
-
// });
|
|
48
|
-
// },
|
|
49
|
-
// andWhen: async function (
|
|
50
|
-
// renderer: renderer.ReactTestRenderer,
|
|
51
|
-
// actioner: () => (any) => any
|
|
52
|
-
// ): Promise<renderer.ReactTestRenderer> {
|
|
53
|
-
// await act(() => actioner()(renderer));
|
|
54
|
-
// return renderer
|
|
55
|
-
// }
|
|
56
|
-
// }
|
|
57
|
-
|
|
58
|
-
export const testInterface = {
|
|
59
|
-
beforeEach: function (CComponent, props): Promise<renderer.ReactTestRenderer> {
|
|
60
|
-
|
|
61
|
-
return new Promise((res, rej) => {
|
|
62
|
-
act(() => {
|
|
63
|
-
const x = renderer.create(new CComponent(props));
|
|
64
|
-
console.log("beforeEach", x.getInstance())
|
|
65
|
-
res(x);
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
andWhen: async function (
|
|
70
|
-
renderer: renderer.ReactTestRenderer,
|
|
71
|
-
actioner: any
|
|
72
|
-
): Promise<renderer.ReactTestRenderer> {
|
|
73
|
-
// console.log("andWhen", renderer)
|
|
74
|
-
await act(() => actioner()(renderer));
|
|
75
|
-
return renderer
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
// andWhen: function (s: Store, actioner): Promise<Selection> {
|
|
79
|
-
// return actioner()(s);
|
|
80
|
-
// },
|
|
81
|
-
butThen: async function (s: IStore): Promise<ISelection> {
|
|
82
|
-
|
|
83
|
-
// console.log("butThen", s)
|
|
84
|
-
return s;
|
|
85
|
-
},
|
|
86
|
-
afterEach: async function (
|
|
87
|
-
store: IStore,
|
|
88
|
-
ndx,
|
|
89
|
-
artificer
|
|
90
|
-
) {
|
|
91
|
-
// console.log("afterEach", store);
|
|
92
|
-
return {
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
afterAll: (store: IStore, artificer) => {
|
|
97
|
-
// console.log("afterAll", store);
|
|
98
|
-
return;
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
}
|
|
@@ -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,77 +0,0 @@
|
|
|
1
|
-
import test from "../../../Node";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import renderer, { act } from "react-test-renderer";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
ITTestShape,
|
|
8
|
-
ITestImplementation,
|
|
9
|
-
ITestSpecification
|
|
10
|
-
} from "../../../core";
|
|
11
|
-
|
|
12
|
-
export type IInput = React.FC;
|
|
13
|
-
export type IWhenShape = unknown;
|
|
14
|
-
export type IThenShape = unknown;
|
|
15
|
-
|
|
16
|
-
export type ISpec<ITestShape extends ITTestShape> = ITestSpecification<
|
|
17
|
-
ITestShape,
|
|
18
|
-
any,
|
|
19
|
-
any,
|
|
20
|
-
any,
|
|
21
|
-
IThenShape
|
|
22
|
-
>
|
|
23
|
-
export default <
|
|
24
|
-
ITestShape extends ITTestShape,
|
|
25
|
-
IPropShape
|
|
26
|
-
>(
|
|
27
|
-
testImplementations: ITestImplementation<
|
|
28
|
-
IPropShape,
|
|
29
|
-
renderer.ReactTestRenderer,
|
|
30
|
-
IWhenShape,
|
|
31
|
-
IThenShape,
|
|
32
|
-
ITestShape
|
|
33
|
-
>,
|
|
34
|
-
testSpecifications: ISpec<ITestShape>,
|
|
35
|
-
testInput: IInput
|
|
36
|
-
) =>
|
|
37
|
-
test<
|
|
38
|
-
ITestShape,
|
|
39
|
-
IInput,
|
|
40
|
-
any,
|
|
41
|
-
renderer.ReactTestRenderer,
|
|
42
|
-
unknown, unknown, unknown, unknown
|
|
43
|
-
>(
|
|
44
|
-
testInput,
|
|
45
|
-
testSpecifications,
|
|
46
|
-
testImplementations,
|
|
47
|
-
{
|
|
48
|
-
beforeEach: function (
|
|
49
|
-
CComponent,
|
|
50
|
-
props
|
|
51
|
-
): Promise<renderer.ReactTestRenderer> {
|
|
52
|
-
|
|
53
|
-
return new Promise((res, rej) => {
|
|
54
|
-
let component: renderer.ReactTestRenderer;
|
|
55
|
-
act(() => {
|
|
56
|
-
component = renderer.create(
|
|
57
|
-
React.createElement(CComponent, props, [])
|
|
58
|
-
);
|
|
59
|
-
res(component);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
andWhen: async function (
|
|
66
|
-
renderer: renderer.ReactTestRenderer,
|
|
67
|
-
actioner: () => (a: any) => any
|
|
68
|
-
): Promise<renderer.ReactTestRenderer> {
|
|
69
|
-
await act(() => actioner()(renderer));
|
|
70
|
-
return renderer;
|
|
71
|
-
},
|
|
72
|
-
afterEach: async (store, key, artificer) => {
|
|
73
|
-
console.log("afterall")
|
|
74
|
-
store.unmount();
|
|
75
|
-
},
|
|
76
|
-
}
|
|
77
|
-
);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
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 = (props?) => JSX.Element;
|
|
10
|
-
export type ISelection = renderer.ReactTestRenderer;
|
|
11
|
-
export type IStore = renderer.ReactTestRenderer;
|
|
12
|
-
export type ISubject = renderer.ReactTestRenderer;
|
|
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
|
-
export const testInterface = {
|
|
35
|
-
beforeEach: function (CComponent, props): Promise<renderer.ReactTestRenderer> {
|
|
36
|
-
let component;
|
|
37
|
-
act(() => {
|
|
38
|
-
component = renderer.create(
|
|
39
|
-
React.createElement(CComponent, props, [])
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
return component;
|
|
43
|
-
},
|
|
44
|
-
andWhen: async function (
|
|
45
|
-
renderer: renderer.ReactTestRenderer,
|
|
46
|
-
actioner: () => (any) => any
|
|
47
|
-
): Promise<renderer.ReactTestRenderer> {
|
|
48
|
-
await act(() => actioner()(renderer));
|
|
49
|
-
return renderer
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -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
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|