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/Puppeteer.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import readline from "readline";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { jsonc } from "jsonc";
|
|
5
|
+
import { v4 as uuidv4 } from "uuid";
|
|
6
|
+
|
|
7
|
+
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
8
|
+
|
|
9
|
+
import { PM_Main } from "./PM/main.js";
|
|
10
|
+
import { destinationOfRuntime } from "./utils.js";
|
|
11
|
+
|
|
12
|
+
var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
13
|
+
|
|
14
|
+
const node2web: Record<string, string[]> = {};
|
|
15
|
+
const web2node: Record<string, string[]> = {};
|
|
16
|
+
const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
17
|
+
|
|
18
|
+
readline.emitKeypressEvents(process.stdin);
|
|
19
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
20
|
+
|
|
21
|
+
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
22
|
+
process.stdin.on("keypress", (str, key) => {
|
|
23
|
+
if (key.name === "q") {
|
|
24
|
+
process.exit();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default async (partialConfig) => {
|
|
29
|
+
const config = {
|
|
30
|
+
...partialConfig,
|
|
31
|
+
buildDir: process.cwd() + "/" + partialConfig.outdir,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
fs.writeFileSync(
|
|
35
|
+
`${config.outdir}/testeranto.json`,
|
|
36
|
+
JSON.stringify(
|
|
37
|
+
{
|
|
38
|
+
...config,
|
|
39
|
+
buildDir: process.cwd() + "/" + config.outdir,
|
|
40
|
+
},
|
|
41
|
+
null,
|
|
42
|
+
2
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const pm = new PM_Main(config);
|
|
47
|
+
|
|
48
|
+
await pm.startPuppeteer(
|
|
49
|
+
{
|
|
50
|
+
waitForInitialPage: false,
|
|
51
|
+
executablePath: "/opt/homebrew/bin/chromium",
|
|
52
|
+
headless: true,
|
|
53
|
+
// dumpio: true,
|
|
54
|
+
args: [
|
|
55
|
+
"--disable-features=IsolateOrigins,site-per-process",
|
|
56
|
+
"--disable-site-isolation-trials",
|
|
57
|
+
"--allow-insecure-localhost",
|
|
58
|
+
"--allow-file-access-from-files",
|
|
59
|
+
"--allow-running-insecure-content",
|
|
60
|
+
// "--auto-open-devtools-for-tabs",
|
|
61
|
+
"--disable-dev-shm-usage",
|
|
62
|
+
"--disable-extensions",
|
|
63
|
+
"--disable-gpu",
|
|
64
|
+
"--disable-setuid-sandbox",
|
|
65
|
+
"--disable-site-isolation-trials",
|
|
66
|
+
"--disable-web-security",
|
|
67
|
+
"--no-first-run",
|
|
68
|
+
"--no-sandbox",
|
|
69
|
+
"--no-startup-window",
|
|
70
|
+
// "--no-zygote",
|
|
71
|
+
"--reduce-security-for-testing",
|
|
72
|
+
"--remote-allow-origins=*",
|
|
73
|
+
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
74
|
+
// "--disable-features=IsolateOrigins",
|
|
75
|
+
// "--remote-allow-origins=ws://localhost:3234",
|
|
76
|
+
// "--single-process",
|
|
77
|
+
// "--unsafely-treat-insecure-origin-as-secure",
|
|
78
|
+
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
79
|
+
`--remote-debugging-port=3234`,
|
|
80
|
+
|
|
81
|
+
// "--disk-cache-dir=/dev/null",
|
|
82
|
+
// "--disk-cache-size=1",
|
|
83
|
+
// "--start-maximized",
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
"."
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
90
|
+
if (runtime === "node") {
|
|
91
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
92
|
+
} else if (runtime === "web") {
|
|
93
|
+
pm.launchWeb(test, destinationOfRuntime(test, "web", config), sidecars);
|
|
94
|
+
} else {
|
|
95
|
+
console.error("runtime makes no sense", runtime);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
console.log("ready and watching for changes...", config.buildDir);
|
|
100
|
+
fs.watch(
|
|
101
|
+
config.buildDir,
|
|
102
|
+
{
|
|
103
|
+
recursive: true,
|
|
104
|
+
},
|
|
105
|
+
(eventType, changedFile) => {
|
|
106
|
+
if (changedFile) {
|
|
107
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
108
|
+
if (eventType === "change" || eventType === "rename") {
|
|
109
|
+
if (
|
|
110
|
+
changedFile ===
|
|
111
|
+
test
|
|
112
|
+
.replace("./", "node/")
|
|
113
|
+
.split(".")
|
|
114
|
+
.slice(0, -1)
|
|
115
|
+
.concat("mjs")
|
|
116
|
+
.join(".")
|
|
117
|
+
) {
|
|
118
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (
|
|
122
|
+
changedFile ===
|
|
123
|
+
test
|
|
124
|
+
.replace("./", "web/")
|
|
125
|
+
.split(".")
|
|
126
|
+
.slice(0, -1)
|
|
127
|
+
.concat("mjs")
|
|
128
|
+
.join(".")
|
|
129
|
+
) {
|
|
130
|
+
pm.launchWeb(
|
|
131
|
+
test,
|
|
132
|
+
destinationOfRuntime(test, "web", config),
|
|
133
|
+
sidecars
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
};
|
package/src/Reporter.ts
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import readline from "readline";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { jsonc } from "jsonc";
|
|
4
|
+
import puppeteer from "puppeteer-core";
|
|
5
|
+
|
|
6
|
+
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
7
|
+
|
|
8
|
+
// import { PM_Main } from "./PM/main.js";
|
|
9
|
+
|
|
10
|
+
// var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
11
|
+
|
|
12
|
+
// const node2web: Record<string, string[]> = {};
|
|
13
|
+
// const web2node: Record<string, string[]> = {};
|
|
14
|
+
// const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
15
|
+
|
|
16
|
+
readline.emitKeypressEvents(process.stdin);
|
|
17
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
18
|
+
|
|
19
|
+
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
20
|
+
process.stdin.on("keypress", (str, key) => {
|
|
21
|
+
if (key.name === "q") {
|
|
22
|
+
process.exit();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const main = async () => {
|
|
27
|
+
const configs = jsonc.parse(
|
|
28
|
+
(await fs.readFileSync("./docs/testeranto.json")).toString()
|
|
29
|
+
) as IBuiltConfig;
|
|
30
|
+
|
|
31
|
+
// const pm = new PM_Main(configs);
|
|
32
|
+
|
|
33
|
+
// await puppeteer.launch(options);
|
|
34
|
+
const browser = await puppeteer.launch(
|
|
35
|
+
{
|
|
36
|
+
waitForInitialPage: false,
|
|
37
|
+
executablePath: "/opt/homebrew/bin/chromium",
|
|
38
|
+
headless: false,
|
|
39
|
+
args: [
|
|
40
|
+
"--allow-file-access-from-files",
|
|
41
|
+
"--allow-running-insecure-content",
|
|
42
|
+
// "--auto-open-devtools-for-tabs",
|
|
43
|
+
"--disable-dev-shm-usage",
|
|
44
|
+
"--disable-extensions",
|
|
45
|
+
"--disable-gpu",
|
|
46
|
+
"--disable-setuid-sandbox",
|
|
47
|
+
"--disable-site-isolation-trials",
|
|
48
|
+
"--disable-web-security",
|
|
49
|
+
"--disable-web-security",
|
|
50
|
+
"--no-first-run",
|
|
51
|
+
"--no-sandbox",
|
|
52
|
+
"--no-startup-window",
|
|
53
|
+
"--no-zygote",
|
|
54
|
+
"--reduce-security-for-testing",
|
|
55
|
+
"--remote-allow-origins=*",
|
|
56
|
+
// "--remote-allow-origins=ws://localhost:3234",
|
|
57
|
+
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
58
|
+
// "--disable-features=IsolateOrigins",
|
|
59
|
+
// "--single-process",
|
|
60
|
+
// "--unsafely-treat-insecure-origin-as-secure",
|
|
61
|
+
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
62
|
+
// `--remote-debugging-port=3234`,
|
|
63
|
+
],
|
|
64
|
+
}
|
|
65
|
+
// "."
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
console.log("Creating new page...");
|
|
69
|
+
const page = await browser.newPage();
|
|
70
|
+
|
|
71
|
+
await page.setViewport({ width: 0, height: 0 });
|
|
72
|
+
|
|
73
|
+
console.log("Requesting url...");
|
|
74
|
+
await page.goto(`file://${process.cwd()}/docs/report.html?local=true`);
|
|
75
|
+
|
|
76
|
+
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
77
|
+
// if (runtime === "node") {
|
|
78
|
+
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
79
|
+
// } else if (runtime === "web") {
|
|
80
|
+
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
81
|
+
// } else {
|
|
82
|
+
// console.error("runtime makes no sense", runtime);
|
|
83
|
+
// }
|
|
84
|
+
// });
|
|
85
|
+
|
|
86
|
+
// console.log("ready and watching for changes...", configs.buildDir);
|
|
87
|
+
// fs.watch(
|
|
88
|
+
// configs.buildDir,
|
|
89
|
+
// {
|
|
90
|
+
// recursive: true,
|
|
91
|
+
// },
|
|
92
|
+
// (eventType, changedFile) => {
|
|
93
|
+
// if (changedFile) {
|
|
94
|
+
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
95
|
+
// if (eventType === "change" || eventType === "rename") {
|
|
96
|
+
// if (
|
|
97
|
+
// changedFile ===
|
|
98
|
+
// test
|
|
99
|
+
// .replace("./", "node/")
|
|
100
|
+
// .split(".")
|
|
101
|
+
// .slice(0, -1)
|
|
102
|
+
// .concat("mjs")
|
|
103
|
+
// .join(".")
|
|
104
|
+
// ) {
|
|
105
|
+
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
// if (
|
|
109
|
+
// changedFile ===
|
|
110
|
+
// test
|
|
111
|
+
// .replace("./", "web/")
|
|
112
|
+
// .split(".")
|
|
113
|
+
// .slice(0, -1)
|
|
114
|
+
// .concat("mjs")
|
|
115
|
+
// .join(".")
|
|
116
|
+
// ) {
|
|
117
|
+
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
118
|
+
// }
|
|
119
|
+
// }
|
|
120
|
+
// });
|
|
121
|
+
// }
|
|
122
|
+
// }
|
|
123
|
+
// );
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
main();
|
package/src/Scheduler.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Testeranto from "../Node.js";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IBaseTest,
|
|
7
|
+
IPartialNodeInterface,
|
|
8
|
+
ITestImplementation,
|
|
9
|
+
ITestSpecification,
|
|
10
|
+
} from "../Types";
|
|
11
|
+
|
|
12
|
+
type IInput = string;
|
|
13
|
+
type ISelection = any;
|
|
14
|
+
type IStore = any;
|
|
15
|
+
type ISubject = any;
|
|
16
|
+
|
|
17
|
+
export type IImpl<ISpec extends IBaseTest> = ITestImplementation<ISpec>;
|
|
18
|
+
|
|
19
|
+
export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
20
|
+
|
|
21
|
+
export default <ITestShape extends IBaseTest>(
|
|
22
|
+
testInput: IInput,
|
|
23
|
+
testSpecifications: ISpec<ITestShape>,
|
|
24
|
+
testImplementations: ITestImplementation<ITestShape>,
|
|
25
|
+
testInterface?: IPartialNodeInterface<ITestShape>
|
|
26
|
+
) => {
|
|
27
|
+
return Testeranto<ITestShape>(
|
|
28
|
+
testInput,
|
|
29
|
+
testSpecifications,
|
|
30
|
+
testImplementations,
|
|
31
|
+
{
|
|
32
|
+
beforeAll(x) {
|
|
33
|
+
// process.parentPort.postMessage(
|
|
34
|
+
// `/docs/web/src/ClassicalComponent/test.html`
|
|
35
|
+
// );
|
|
36
|
+
|
|
37
|
+
return x;
|
|
38
|
+
},
|
|
39
|
+
beforeEach: async (): Promise<IStore> => {
|
|
40
|
+
return new Promise((resolve, rej) => {
|
|
41
|
+
resolve(React.createElement(testInput, {}, []));
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
45
|
+
return whenCB()(s);
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
...testInterface,
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Testeranto from "../../../Node.js";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IBaseTest,
|
|
7
|
+
ITestImplementation,
|
|
8
|
+
ITestSpecification,
|
|
9
|
+
} from "../../../Types";
|
|
10
|
+
|
|
11
|
+
type IInput = typeof React.Component;
|
|
12
|
+
type ISelection = React.CElement<any, any>;
|
|
13
|
+
type IStore = React.CElement<any, any>;
|
|
14
|
+
type ISubject = React.CElement<any, any>;
|
|
15
|
+
|
|
16
|
+
export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
|
|
17
|
+
ISpec,
|
|
18
|
+
object
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
22
|
+
|
|
23
|
+
export default <ITestShape extends IBaseTest, IState>(
|
|
24
|
+
testImplementations: ITestImplementation<ITestShape>,
|
|
25
|
+
testSpecifications: ISpec<ITestShape>,
|
|
26
|
+
testInput: IInput
|
|
27
|
+
) => {
|
|
28
|
+
return Testeranto<ITestShape>(
|
|
29
|
+
testInput,
|
|
30
|
+
testSpecifications,
|
|
31
|
+
testImplementations,
|
|
32
|
+
{
|
|
33
|
+
beforeEach: async (): Promise<IStore> => {
|
|
34
|
+
return new Promise((resolve, rej) => {
|
|
35
|
+
resolve(React.createElement(testInput, {}, []));
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
39
|
+
return whenCB()(s);
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Testeranto from "../../../Web.js";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IBaseTest,
|
|
7
|
+
ITestImplementation,
|
|
8
|
+
ITestSpecification,
|
|
9
|
+
} from "../../../Types";
|
|
10
|
+
|
|
11
|
+
type IInput = typeof React.Component;
|
|
12
|
+
type ISelection = React.CElement<any, any>;
|
|
13
|
+
type Store = React.CElement<any, any>;
|
|
14
|
+
// type Subject = React.CElement<any, any>;
|
|
15
|
+
|
|
16
|
+
export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
|
|
17
|
+
ISpec,
|
|
18
|
+
object
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
22
|
+
|
|
23
|
+
export default <ITestShape extends IBaseTest>(
|
|
24
|
+
testImplementations: ITestImplementation<ITestShape>,
|
|
25
|
+
testSpecifications: ISpec<ITestShape>,
|
|
26
|
+
testInput: IInput
|
|
27
|
+
) => {
|
|
28
|
+
return Testeranto<ITestShape>(
|
|
29
|
+
testInput,
|
|
30
|
+
testSpecifications,
|
|
31
|
+
testImplementations,
|
|
32
|
+
{
|
|
33
|
+
beforeEach: async (): Promise<Store> => {
|
|
34
|
+
return new Promise((resolve, rej) => {
|
|
35
|
+
resolve(React.createElement(testInput, {}, []));
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
andWhen: function (s: Store, whenCB): Promise<ISelection> {
|
|
39
|
+
return whenCB()(s);
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CElement } from "react";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
IBaseTest,
|
|
5
|
+
IPartialInterface,
|
|
6
|
+
ITestImplementation,
|
|
7
|
+
ITestSpecification,
|
|
8
|
+
} from "../../../Types";
|
|
9
|
+
import React from "react";
|
|
10
|
+
|
|
11
|
+
export type IWhenShape = any;
|
|
12
|
+
export type IThenShape = any;
|
|
13
|
+
export type InitialState = unknown;
|
|
14
|
+
export type IInput = () => JSX.Element;
|
|
15
|
+
export type ISelection = CElement<any, any>;
|
|
16
|
+
export type IStore = CElement<any, any>;
|
|
17
|
+
export type ISubject = CElement<any, any>;
|
|
18
|
+
|
|
19
|
+
export type ITestImpl<ITestShape extends IBaseTest> =
|
|
20
|
+
ITestImplementation<ITestShape>;
|
|
21
|
+
|
|
22
|
+
export type ITestSpec<ITestShape extends IBaseTest> =
|
|
23
|
+
ITestSpecification<ITestShape>;
|
|
24
|
+
|
|
25
|
+
export const testInterface: IPartialInterface<any> = {
|
|
26
|
+
// beforeAll: async (proto, testResource, artificer, pm): Promise<IStore> => {
|
|
27
|
+
// return React.createElement(proto);
|
|
28
|
+
// // return new Promise((resolve, rej) => {
|
|
29
|
+
// // resolve(x());
|
|
30
|
+
// // });
|
|
31
|
+
// },
|
|
32
|
+
beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
|
|
33
|
+
return new Promise((resolve, rej) => {
|
|
34
|
+
const x = React.createElement(subject);
|
|
35
|
+
console.log("react-element", x);
|
|
36
|
+
resolve(x);
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
40
|
+
return whenCB(s);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Testeranto from "../../../Node.js";
|
|
2
|
+
import { IBaseTest, IPartialInterface } from "../../../Types";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ITestImpl,
|
|
6
|
+
ITestSpec,
|
|
7
|
+
IInput,
|
|
8
|
+
testInterface as baseInterface,
|
|
9
|
+
} from "./index.js";
|
|
10
|
+
|
|
11
|
+
export default <ITestShape extends IBaseTest>(
|
|
12
|
+
testImplementations: ITestImpl<ITestShape>,
|
|
13
|
+
testSpecifications: ITestSpec<ITestShape>,
|
|
14
|
+
testInput: IInput,
|
|
15
|
+
testInterface: IPartialInterface<ITestShape>
|
|
16
|
+
) => {
|
|
17
|
+
return Testeranto<ITestShape>(
|
|
18
|
+
testInput,
|
|
19
|
+
testSpecifications,
|
|
20
|
+
testImplementations,
|
|
21
|
+
{
|
|
22
|
+
...baseInterface,
|
|
23
|
+
...testInterface,
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IBaseTest,
|
|
3
|
+
IPartialInterface,
|
|
4
|
+
IPartialWebInterface,
|
|
5
|
+
} from "../../../Types";
|
|
6
|
+
import Testeranto from "../../../Web.js";
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
ITestImpl,
|
|
10
|
+
ITestSpec,
|
|
11
|
+
IInput,
|
|
12
|
+
testInterface as baseInterface,
|
|
13
|
+
} from "./index.js";
|
|
14
|
+
|
|
15
|
+
export default <ITestShape extends IBaseTest>(
|
|
16
|
+
testImplementations: ITestImpl<ITestShape>,
|
|
17
|
+
testSpecifications: ITestSpec<ITestShape>,
|
|
18
|
+
testInput: IInput,
|
|
19
|
+
testInterface: IPartialWebInterface<ITestShape>
|
|
20
|
+
) => {
|
|
21
|
+
return Testeranto<ITestShape>(
|
|
22
|
+
testInput,
|
|
23
|
+
testSpecifications,
|
|
24
|
+
testImplementations,
|
|
25
|
+
{
|
|
26
|
+
...baseInterface,
|
|
27
|
+
...testInterface,
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React, { ReactNode, createElement } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
renderToStaticMarkup,
|
|
4
|
+
renderToStaticNodeStream,
|
|
5
|
+
} from "react-dom/server";
|
|
6
|
+
import Stream from "stream";
|
|
4
7
|
|
|
5
|
-
import
|
|
6
|
-
|
|
8
|
+
import Testeranto from "../../../Node.js";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
IBaseTest,
|
|
12
|
+
ITestImplementation,
|
|
13
|
+
ITestSpecification,
|
|
14
|
+
} from "../../../Types";
|
|
7
15
|
|
|
8
16
|
type IInput = typeof React.Component;
|
|
9
17
|
type InitialState = unknown;
|
|
@@ -13,37 +21,14 @@ export type ISelection = ReactNode;
|
|
|
13
21
|
export type IStore = ReactNode;
|
|
14
22
|
export type ISubject = ReactNode;
|
|
15
23
|
|
|
16
|
-
export {
|
|
17
|
-
renderToStaticMarkup, renderToStaticNodeStream, Stream
|
|
18
|
-
}
|
|
24
|
+
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
19
25
|
|
|
20
|
-
export default <ITestShape extends
|
|
21
|
-
testImplementations: ITestImplementation<
|
|
22
|
-
|
|
23
|
-
ISelection,
|
|
24
|
-
IWhenShape,
|
|
25
|
-
IThenShape,
|
|
26
|
-
ITestShape
|
|
27
|
-
>,
|
|
28
|
-
testSpecifications: ITestSpecification<
|
|
29
|
-
ITestShape,
|
|
30
|
-
ISubject,
|
|
31
|
-
IStore,
|
|
32
|
-
ISelection,
|
|
33
|
-
IThenShape
|
|
34
|
-
>,
|
|
26
|
+
export default <ITestShape extends IBaseTest>(
|
|
27
|
+
testImplementations: ITestImplementation<ITestShape>,
|
|
28
|
+
testSpecifications: ITestSpecification<ITestShape>,
|
|
35
29
|
testInput: IInput
|
|
36
30
|
) => {
|
|
37
|
-
return Testeranto<
|
|
38
|
-
ITestShape,
|
|
39
|
-
IInput,
|
|
40
|
-
ISubject,
|
|
41
|
-
IStore,
|
|
42
|
-
ISelection,
|
|
43
|
-
IThenShape,
|
|
44
|
-
IWhenShape,
|
|
45
|
-
InitialState
|
|
46
|
-
>(
|
|
31
|
+
return Testeranto<ITestShape>(
|
|
47
32
|
testInput,
|
|
48
33
|
testSpecifications,
|
|
49
34
|
testImplementations,
|
|
@@ -71,28 +56,23 @@ export default <ITestShape extends ITTestShape>(
|
|
|
71
56
|
resolve(createElement(testInput));
|
|
72
57
|
});
|
|
73
58
|
},
|
|
74
|
-
andWhen: async function (s: IStore,
|
|
75
|
-
|
|
76
|
-
return s
|
|
59
|
+
andWhen: async function (s: IStore, whenCB): Promise<ISelection> {
|
|
60
|
+
return whenCB(s);
|
|
61
|
+
// return s
|
|
77
62
|
},
|
|
78
63
|
butThen: async function (s: IStore): Promise<ISelection> {
|
|
79
64
|
return s;
|
|
80
65
|
},
|
|
81
|
-
afterEach: async function (
|
|
82
|
-
store: IStore,
|
|
83
|
-
ndx,
|
|
84
|
-
artificer
|
|
85
|
-
) {
|
|
66
|
+
afterEach: async function (store: IStore, ndx, artificer) {
|
|
86
67
|
return {};
|
|
87
68
|
},
|
|
88
69
|
afterAll: (store: IStore, artificer) => {
|
|
89
70
|
return;
|
|
90
71
|
},
|
|
91
|
-
}
|
|
92
|
-
)
|
|
72
|
+
}
|
|
73
|
+
);
|
|
93
74
|
};
|
|
94
75
|
|
|
95
|
-
|
|
96
76
|
// type IInput = typeof React.Component;
|
|
97
77
|
// type InitialState = unknown;
|
|
98
78
|
// type IWhenShape = any;
|
|
@@ -142,7 +122,7 @@ export default <ITestShape extends ITTestShape>(
|
|
|
142
122
|
// resolve(ReactDOMServer.renderToStaticMarkup(element));
|
|
143
123
|
// });
|
|
144
124
|
// },
|
|
145
|
-
// andWhen: function (s: IStore,
|
|
125
|
+
// andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
146
126
|
// throw new Error(`"andWhens" are not permitted`);
|
|
147
127
|
// }
|
|
148
128
|
// },
|