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
package/src/electron.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { app, BrowserWindow, ipcMain } from "electron";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import url from "url";
|
|
4
|
-
|
|
5
|
-
let win: BrowserWindow;
|
|
6
|
-
|
|
7
|
-
function createWindow() {
|
|
8
|
-
win = new BrowserWindow({
|
|
9
|
-
|
|
10
|
-
webPreferences: {
|
|
11
|
-
devTools: true,
|
|
12
|
-
nodeIntegration: true,
|
|
13
|
-
nodeIntegrationInWorker: true,
|
|
14
|
-
contextIsolation: false,
|
|
15
|
-
preload: path.join(app.getAppPath(), 'preload.js'),
|
|
16
|
-
sandbox: false
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
width: 800,
|
|
20
|
-
height: 600,
|
|
21
|
-
show: false,
|
|
22
|
-
});
|
|
23
|
-
const u = url.format({
|
|
24
|
-
pathname: path.join(process.cwd(), process.argv[2]),
|
|
25
|
-
protocol: "file:",
|
|
26
|
-
slashes: true,
|
|
27
|
-
query: {
|
|
28
|
-
requesting: encodeURIComponent(process.argv[3]),
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
console.log("loading", u);
|
|
32
|
-
win.loadURL(u);
|
|
33
|
-
win.webContents.openDevTools()
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
app.on("ready", createWindow);
|
|
37
|
-
|
|
38
|
-
ipcMain.handle('web-log', (x, message: string) => {
|
|
39
|
-
console.log("web-log)", message);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
ipcMain.handle('web-error', (x, message: string) => {
|
|
43
|
-
console.log("web-error)", message);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
ipcMain.handle('web-warn', (x, message: string) => {
|
|
47
|
-
console.log("web-warn)", message);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
ipcMain.handle('web-info', (x, message: string) => {
|
|
51
|
-
console.log("web-info)", message);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
ipcMain.handle('quit-app', (x, failed: number) => {
|
|
55
|
-
console.log("quit-app", failed);
|
|
56
|
-
app.exit(failed);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export { };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
|
|
4
|
-
import Testeranto from "../../../Node";
|
|
5
|
-
|
|
6
|
-
type IWhenShape = any;
|
|
7
|
-
type IThenShape = any;
|
|
8
|
-
|
|
9
|
-
type IInput = typeof React.Component;
|
|
10
|
-
type ISelection = React.CElement<any, any>
|
|
11
|
-
type IStore = React.CElement<any, any>
|
|
12
|
-
type ISubject = React.CElement<any, any>
|
|
13
|
-
|
|
14
|
-
export type IImpl<
|
|
15
|
-
ISpec extends ITTestShape,
|
|
16
|
-
IState
|
|
17
|
-
> = ITestImplementation<
|
|
18
|
-
IState,
|
|
19
|
-
ISelection,
|
|
20
|
-
IWhenShape,
|
|
21
|
-
IThenShape,
|
|
22
|
-
ISpec
|
|
23
|
-
>
|
|
24
|
-
|
|
25
|
-
export type ISpec<
|
|
26
|
-
T extends ITTestShape
|
|
27
|
-
> = ITestSpecification<
|
|
28
|
-
T,
|
|
29
|
-
ISubject,
|
|
30
|
-
IStore,
|
|
31
|
-
ISelection,
|
|
32
|
-
IThenShape
|
|
33
|
-
>;
|
|
34
|
-
|
|
35
|
-
export default <
|
|
36
|
-
ITestShape extends ITTestShape,
|
|
37
|
-
IState
|
|
38
|
-
>(
|
|
39
|
-
testImplementations: ITestImplementation<
|
|
40
|
-
IState,
|
|
41
|
-
ISelection,
|
|
42
|
-
IWhenShape,
|
|
43
|
-
IThenShape,
|
|
44
|
-
ITestShape
|
|
45
|
-
>,
|
|
46
|
-
testSpecifications: ISpec<ITestShape>,
|
|
47
|
-
testInput: IInput
|
|
48
|
-
) => {
|
|
49
|
-
return Testeranto<
|
|
50
|
-
ITestShape,
|
|
51
|
-
IInput,
|
|
52
|
-
ISubject,
|
|
53
|
-
IStore,
|
|
54
|
-
ISelection,
|
|
55
|
-
IThenShape,
|
|
56
|
-
IWhenShape,
|
|
57
|
-
IState
|
|
58
|
-
>(
|
|
59
|
-
testInput,
|
|
60
|
-
testSpecifications,
|
|
61
|
-
testImplementations,
|
|
62
|
-
{
|
|
63
|
-
beforeEach: async (
|
|
64
|
-
): Promise<IStore> => {
|
|
65
|
-
return new Promise((resolve, rej) => {
|
|
66
|
-
resolve(React.createElement(testInput, {
|
|
67
|
-
}, []));
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
andWhen: function (s: IStore, actioner): Promise<ISelection> {
|
|
71
|
-
return actioner()(s);
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
)
|
|
75
|
-
};
|
|
@@ -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,129 +0,0 @@
|
|
|
1
|
-
import React, { CElement, createElement } from "react";
|
|
2
|
-
import ReactDom from "react-dom/client";
|
|
3
|
-
|
|
4
|
-
import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
|
|
5
|
-
import Testeranto from "../../../Web";
|
|
6
|
-
|
|
7
|
-
type IInput = typeof React.Component;
|
|
8
|
-
type InitialState = unknown;
|
|
9
|
-
type IWhenShape = any;
|
|
10
|
-
type IThenShape = any;
|
|
11
|
-
type ISelection = {
|
|
12
|
-
htmlElement: HTMLElement,
|
|
13
|
-
reactElement: CElement<any, any>,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type IStore = {
|
|
17
|
-
htmlElement: HTMLElement,
|
|
18
|
-
reactElement: CElement<any, any>,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
type ISubject = {
|
|
22
|
-
htmlElement: HTMLElement
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default <ITestShape extends ITTestShape>(
|
|
26
|
-
testImplementations: ITestImplementation<
|
|
27
|
-
InitialState,
|
|
28
|
-
ISelection,
|
|
29
|
-
IWhenShape,
|
|
30
|
-
IThenShape,
|
|
31
|
-
ITestShape
|
|
32
|
-
>,
|
|
33
|
-
testSpecifications: ITestSpecification<
|
|
34
|
-
ITestShape,
|
|
35
|
-
ISubject,
|
|
36
|
-
IStore,
|
|
37
|
-
ISelection,
|
|
38
|
-
IThenShape
|
|
39
|
-
>,
|
|
40
|
-
testInput: IInput
|
|
41
|
-
) => {
|
|
42
|
-
|
|
43
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
44
|
-
console.log("DOMContentLoaded")
|
|
45
|
-
const elem = document.getElementById("root");
|
|
46
|
-
if (elem) {
|
|
47
|
-
class TesterantoComponent extends testInput {
|
|
48
|
-
done: (t: TesterantoComponent) => void;
|
|
49
|
-
constructor(props) {
|
|
50
|
-
super(props);
|
|
51
|
-
this.done = props.done;
|
|
52
|
-
}
|
|
53
|
-
componentDidMount() {
|
|
54
|
-
super.componentDidMount && super.componentDidMount();
|
|
55
|
-
return this.done(this);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return Testeranto<
|
|
60
|
-
ITestShape,
|
|
61
|
-
IInput,
|
|
62
|
-
ISubject,
|
|
63
|
-
IStore,
|
|
64
|
-
ISelection,
|
|
65
|
-
IThenShape,
|
|
66
|
-
IWhenShape,
|
|
67
|
-
InitialState
|
|
68
|
-
>(
|
|
69
|
-
testInput,
|
|
70
|
-
testSpecifications,
|
|
71
|
-
testImplementations,
|
|
72
|
-
{
|
|
73
|
-
beforeAll: async (
|
|
74
|
-
prototype,
|
|
75
|
-
artificer
|
|
76
|
-
): Promise<ISubject> => {
|
|
77
|
-
return await new Promise((resolve, rej) => {
|
|
78
|
-
const elem = document.getElementById("root");
|
|
79
|
-
if (elem) {
|
|
80
|
-
resolve({ htmlElement: elem });
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
beforeEach: async (
|
|
86
|
-
{ htmlElement },
|
|
87
|
-
ndx,
|
|
88
|
-
testRsource,
|
|
89
|
-
artificer
|
|
90
|
-
): Promise<IStore> => {
|
|
91
|
-
return new Promise((resolve, rej) => {
|
|
92
|
-
// Ignore these type errors
|
|
93
|
-
ReactDom.createRoot(htmlElement).render(createElement(
|
|
94
|
-
TesterantoComponent, {
|
|
95
|
-
done: (reactElement) => {
|
|
96
|
-
resolve(
|
|
97
|
-
{
|
|
98
|
-
htmlElement,
|
|
99
|
-
reactElement,
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
}, []
|
|
104
|
-
));
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
andWhen: function (s: IStore, actioner): Promise<ISelection> {
|
|
108
|
-
return actioner()(s);
|
|
109
|
-
},
|
|
110
|
-
butThen: async function (s: IStore): Promise<ISelection> {
|
|
111
|
-
return s;
|
|
112
|
-
},
|
|
113
|
-
afterEach: async function (
|
|
114
|
-
store: IStore,
|
|
115
|
-
ndx,
|
|
116
|
-
artificer
|
|
117
|
-
) {
|
|
118
|
-
return {};
|
|
119
|
-
},
|
|
120
|
-
afterAll: (store: IStore, artificer) => {
|
|
121
|
-
return;
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, createElement } from "react";
|
|
2
|
-
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
|
-
import Stream from 'stream'
|
|
4
|
-
|
|
5
|
-
import { ITTestShape, ITestImplementation, ITestSpecification } from "../../../core";
|
|
6
|
-
import Testeranto from "../../../Node";
|
|
7
|
-
|
|
8
|
-
export type IInput = () => JSX.Element;
|
|
9
|
-
type InitialState = unknown;
|
|
10
|
-
type IWhenShape = any;
|
|
11
|
-
export type IThenShape = any;
|
|
12
|
-
export type ISelection = ReactNode;
|
|
13
|
-
export type IStore = ReactNode;
|
|
14
|
-
export type ISubject = ReactNode;
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
renderToStaticMarkup, renderToStaticNodeStream, Stream
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default <ITestShape extends ITTestShape>(
|
|
21
|
-
testImplementations: ITestImplementation<
|
|
22
|
-
InitialState,
|
|
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
|
-
InitialState
|
|
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
|
-
// const elem = document.getElementById("root");
|
|
57
|
-
// if (elem) {
|
|
58
|
-
// resolve({ htmlElement: elem });
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
// })
|
|
62
|
-
// },
|
|
63
|
-
beforeEach: async (
|
|
64
|
-
reactComponent,
|
|
65
|
-
ndx,
|
|
66
|
-
testRsource,
|
|
67
|
-
artificer
|
|
68
|
-
): Promise<IStore> => {
|
|
69
|
-
return new Promise((resolve, rej) => {
|
|
70
|
-
// Ignore these type errors
|
|
71
|
-
resolve(createElement(testInput));
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
andWhen: async function (s: IStore, actioner): Promise<ISelection> {
|
|
75
|
-
// return actioner()(s);
|
|
76
|
-
return s
|
|
77
|
-
},
|
|
78
|
-
butThen: async function (s: IStore): Promise<ISelection> {
|
|
79
|
-
return s;
|
|
80
|
-
},
|
|
81
|
-
afterEach: async function (
|
|
82
|
-
store: IStore,
|
|
83
|
-
ndx,
|
|
84
|
-
artificer
|
|
85
|
-
) {
|
|
86
|
-
return {};
|
|
87
|
-
},
|
|
88
|
-
afterAll: (store: IStore, artificer) => {
|
|
89
|
-
return;
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
)
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// type IInput = typeof React.Component;
|
|
97
|
-
// type InitialState = unknown;
|
|
98
|
-
// type IWhenShape = any;
|
|
99
|
-
// type IThenShape = any;
|
|
100
|
-
// type ISelection = string;
|
|
101
|
-
// type IStore = string;
|
|
102
|
-
// type ISubject = string
|
|
103
|
-
|
|
104
|
-
// export default <ITestShape extends ITTestShape>(
|
|
105
|
-
// testImplementations: ITestImplementation<
|
|
106
|
-
// InitialState,
|
|
107
|
-
// ISelection,
|
|
108
|
-
// IWhenShape,
|
|
109
|
-
// IThenShape,
|
|
110
|
-
// ITestShape
|
|
111
|
-
// >,
|
|
112
|
-
// testSpecifications: ITestSpecification<
|
|
113
|
-
// ITestShape,
|
|
114
|
-
// ISubject,
|
|
115
|
-
// IStore,
|
|
116
|
-
// ISelection,
|
|
117
|
-
// IThenShape
|
|
118
|
-
// >,
|
|
119
|
-
// testInput: IInput
|
|
120
|
-
// ) => {
|
|
121
|
-
// return Testeranto<
|
|
122
|
-
// ITestShape,
|
|
123
|
-
// IInput,
|
|
124
|
-
// ISubject,
|
|
125
|
-
// IStore,
|
|
126
|
-
// ISelection,
|
|
127
|
-
// IThenShape,
|
|
128
|
-
// IWhenShape,
|
|
129
|
-
// InitialState
|
|
130
|
-
// >(
|
|
131
|
-
// testInput,
|
|
132
|
-
// testSpecifications,
|
|
133
|
-
// testImplementations,
|
|
134
|
-
// {
|
|
135
|
-
// beforeEach: async (
|
|
136
|
-
// element,
|
|
137
|
-
// ndx,
|
|
138
|
-
// testResource,
|
|
139
|
-
// artificer
|
|
140
|
-
// ): Promise<IStore> => {
|
|
141
|
-
// return new Promise((resolve, rej) => {
|
|
142
|
-
// resolve(ReactDOMServer.renderToStaticMarkup(element));
|
|
143
|
-
// });
|
|
144
|
-
// },
|
|
145
|
-
// andWhen: function (s: IStore, actioner): Promise<ISelection> {
|
|
146
|
-
// throw new Error(`"andWhens" are not permitted`);
|
|
147
|
-
// }
|
|
148
|
-
// },
|
|
149
|
-
// )
|
|
150
|
-
// };
|