testeranto 0.74.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +5 -2
- package/Bundle.Dockerfile +52 -0
- package/README.md +25 -24
- package/build-tests.ts +16 -0
- package/dist/common/build-tests.js +38 -0
- package/dist/common/init-docs.js +8 -0
- package/dist/common/run-tests.js +34 -0
- package/dist/common/src/Aider.js +96 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{Node.js → src/Node.js} +1 -0
- package/dist/common/src/PM/index.js +7 -0
- package/dist/common/{PM → src/PM}/main.js +287 -10
- package/dist/common/{PM → src/PM}/node.js +4 -0
- package/dist/common/{PM → src/PM}/web.js +3 -0
- package/dist/common/{Project.js → src/Project.js} +15 -57
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +117 -0
- package/dist/common/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/common/{Types.js → src/Types.js} +0 -2
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +52 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/common/src/esbuildConfigs/report.js +14 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/common/src/lib/abstractBase.js +581 -0
- package/dist/common/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/common/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/common/{lib → src/lib}/core.js +3 -5
- package/dist/common/src/lib/types.js +2 -0
- package/dist/common/src/utils.js +16 -0
- package/dist/common/testeranto.js +15 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/build-tests.js +10 -0
- package/dist/module/init-docs.js +3 -0
- package/dist/module/run-tests.js +6 -0
- package/dist/module/src/Aider.js +89 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{Node.js → src/Node.js} +1 -0
- package/dist/module/src/PM/index.js +3 -0
- package/dist/module/src/PM/main.js +617 -0
- package/dist/module/{PM → src/PM}/node.js +4 -0
- package/dist/module/{PM → src/PM}/web.js +3 -0
- package/dist/module/{Project.js → src/Project.js} +15 -57
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +89 -0
- package/dist/module/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +1 -1
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +1 -1
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +47 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/module/src/esbuildConfigs/report.js +14 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/module/src/lib/abstractBase.js +573 -0
- package/dist/module/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/module/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/module/{lib → src/lib}/core.js +3 -5
- package/dist/module/src/utils.js +9 -0
- package/dist/module/testeranto.js +13 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/build-tests.d.ts +3 -0
- package/dist/types/init-docs.d.ts +2 -0
- package/dist/types/run-tests.d.ts +2 -0
- package/dist/types/src/Aider.d.ts +1 -0
- package/dist/types/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +6 -0
- package/dist/types/{PM → src/PM}/index.d.ts +3 -2
- package/dist/types/{PM → src/PM}/main.d.ts +8 -3
- package/dist/types/{PM → src/PM}/node.d.ts +2 -0
- package/dist/types/{PM → src/PM}/web.d.ts +1 -0
- package/dist/types/{Project.d.ts → src/Project.d.ts} +1 -1
- package/dist/types/src/Puppeteer.d.ts +2 -0
- package/dist/types/src/SubPackages/puppeteer.d.ts +6 -0
- package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +11 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -7
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +3 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +1 -2
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
- package/dist/types/src/Types.d.ts +51 -0
- package/dist/types/src/Web.d.ts +6 -0
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +8 -8
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/classBuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/core.d.ts +1 -1
- package/dist/types/{lib → src/lib}/index.d.ts +5 -5
- package/dist/types/{lib → src/lib}/types.d.ts +15 -15
- package/dist/types/src/utils.d.ts +2 -0
- package/dist/types/testeranto.d.ts +16 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docker-compose.yml +37 -0
- package/init-docs.ts +5 -0
- package/package.json +72 -25
- package/run-tests.ts +9 -0
- package/src/Aider.ts +125 -0
- package/src/Init.ts +20 -0
- package/src/Node.ts +31 -2
- package/src/PM/index.ts +7 -84
- package/src/PM/main.ts +400 -16
- package/src/PM/node.ts +6 -0
- package/src/PM/web.ts +4 -0
- package/src/Project.ts +33 -84
- package/src/Puppeteer.ts +115 -62
- package/src/SubPackages/react-dom/component/web.ts +10 -30
- package/src/SubPackages/react-dom/jsx/web.ts +110 -76
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
- package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
- package/src/Types.ts +138 -29
- package/src/Web.ts +32 -2
- package/src/esbuildConfigs/index.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +67 -0
- package/src/esbuildConfigs/node.ts +4 -2
- package/src/esbuildConfigs/report.ts +13 -13
- package/src/esbuildConfigs/web.ts +4 -0
- package/src/lib/abstractBase.ts +366 -36
- package/src/lib/basebuilder.ts +26 -52
- package/src/lib/classBuilder.ts +14 -2
- package/src/lib/core.ts +18 -7
- package/src/lib/index.ts +115 -7
- package/src/lib/types.ts +143 -37
- package/src/utils.ts +15 -0
- package/testeranto.ts +13 -0
- package/tsconfig.common.json +12 -4
- package/tsconfig.json +9 -3
- package/tsconfig.module.json +2 -3
- package/tsconfig.types.json +1 -2
- package/dist/common/Features.js +0 -84
- package/dist/common/PM/index.js +0 -71
- package/dist/common/Reporter.js +0 -119
- package/dist/common/Scheduler.js +0 -1
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -93
- package/dist/common/esbuildConfigs/report.js +0 -13
- package/dist/common/lib/abstractBase.js +0 -348
- package/dist/common/preload.js +0 -15
- package/dist/common/report.html.js +0 -31
- package/dist/module/Features.js +0 -73
- package/dist/module/PM/index.js +0 -67
- package/dist/module/PM/main.js +0 -340
- package/dist/module/Reporter.js +0 -114
- package/dist/module/Scheduler.js +0 -1
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -65
- package/dist/module/Types.js +0 -3
- package/dist/module/esbuildConfigs/report.js +0 -11
- package/dist/module/lib/abstractBase.js +0 -340
- package/dist/module/preload.js +0 -15
- package/dist/module/report.html.js +0 -29
- package/dist/prebuild/Report.css +0 -11358
- package/dist/prebuild/Report.js +0 -37585
- package/dist/types/Features.d.ts +0 -68
- package/dist/types/Node.d.ts +0 -6
- package/dist/types/SubPackages/puppeteer.d.ts +0 -6
- 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/web.d.ts +0 -5
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -6
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/Types.d.ts +0 -50
- package/dist/types/Web.d.ts +0 -6
- package/dist/types/esbuildConfigs/report.d.ts +0 -4
- package/dist/types/preload.d.ts +0 -0
- package/dist/types/report.html.d.ts +0 -2
- package/electronBuild.ts +0 -32
- package/src/Features.ts +0 -118
- package/src/Report.tsx +0 -521
- package/src/Reporter.ts +0 -134
- package/src/Scheduler.ts +0 -0
- package/src/preload.ts +0 -17
- package/src/report.html.ts +0 -29
- package/tests/Rectangle.test.ts +0 -189
- /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Web.js → src/Web.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/common/{lib → src/lib}/index.js +0 -0
- /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/{types/Puppeteer.d.ts → module/src/Types.js} +0 -0
- /package/dist/module/{Web.js → src/Web.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/module/{lib → src/lib}/index.js +0 -0
- /package/dist/{types/Reporter.d.ts → module/src/lib/types.js} +0 -0
- /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{Scheduler.d.ts → src/esbuildConfigs/report.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/src/lib/basebuilder.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { PassThrough } from "stream";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
ITTestResourceRequest,
|
|
5
|
-
ITestJob,
|
|
6
|
-
ITLog,
|
|
7
|
-
ILogWriter,
|
|
8
|
-
ITTestResourceConfiguration,
|
|
9
|
-
} from ".";
|
|
3
|
+
import { ITTestResourceRequest, ITestJob, ITLog } from ".";
|
|
10
4
|
import { IBaseTest, ITestSpecification } from "../Types.js";
|
|
11
5
|
|
|
12
6
|
import {
|
|
@@ -15,9 +9,7 @@ import {
|
|
|
15
9
|
IWhenKlasser,
|
|
16
10
|
IThenKlasser,
|
|
17
11
|
ICheckKlasser,
|
|
18
|
-
// IUtils,
|
|
19
12
|
} from "./types.js";
|
|
20
|
-
|
|
21
13
|
import {
|
|
22
14
|
BaseCheck,
|
|
23
15
|
BaseSuite,
|
|
@@ -28,7 +20,20 @@ import {
|
|
|
28
20
|
import { PM } from "../PM/index.js";
|
|
29
21
|
|
|
30
22
|
export abstract class BaseBuilder<
|
|
31
|
-
ITestShape extends IBaseTest
|
|
23
|
+
ITestShape extends IBaseTest<
|
|
24
|
+
unknown,
|
|
25
|
+
unknown,
|
|
26
|
+
unknown,
|
|
27
|
+
unknown,
|
|
28
|
+
unknown,
|
|
29
|
+
unknown,
|
|
30
|
+
unknown,
|
|
31
|
+
Record<string, any>,
|
|
32
|
+
Record<string, any>,
|
|
33
|
+
Record<string, any>,
|
|
34
|
+
Record<string, any>,
|
|
35
|
+
Record<string, any>
|
|
36
|
+
>,
|
|
32
37
|
SuiteExtensions,
|
|
33
38
|
GivenExtensions,
|
|
34
39
|
WhenExtensions,
|
|
@@ -59,7 +64,6 @@ export abstract class BaseBuilder<
|
|
|
59
64
|
checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>,
|
|
60
65
|
testResourceRequirement: ITTestResourceRequest,
|
|
61
66
|
testSpecification: any
|
|
62
|
-
// puppetMaster: PM
|
|
63
67
|
) {
|
|
64
68
|
this.artifacts = [];
|
|
65
69
|
this.testResourceRequirement = testResourceRequirement;
|
|
@@ -69,7 +73,6 @@ export abstract class BaseBuilder<
|
|
|
69
73
|
this.thenOverides = thenOverides;
|
|
70
74
|
this.checkOverides = checkOverides;
|
|
71
75
|
this.testSpecification = testSpecification;
|
|
72
|
-
// this.puppetMaster = puppetMaster;
|
|
73
76
|
|
|
74
77
|
this.specs = testSpecification(
|
|
75
78
|
this.Suites(),
|
|
@@ -83,7 +86,6 @@ export abstract class BaseBuilder<
|
|
|
83
86
|
const suiteRunner =
|
|
84
87
|
(suite: BaseSuite<ITestShape>) =>
|
|
85
88
|
async (
|
|
86
|
-
// testResourceConfiguration: ITTestResourceConfiguration,
|
|
87
89
|
puppetMaster: PM,
|
|
88
90
|
tLog: ITLog
|
|
89
91
|
): Promise<BaseSuite<ITestShape>> => {
|
|
@@ -114,7 +116,6 @@ export abstract class BaseBuilder<
|
|
|
114
116
|
|
|
115
117
|
return {
|
|
116
118
|
test: suite,
|
|
117
|
-
// testResourceRequirement,
|
|
118
119
|
|
|
119
120
|
toObj: () => {
|
|
120
121
|
return suite.toObj();
|
|
@@ -122,48 +123,12 @@ export abstract class BaseBuilder<
|
|
|
122
123
|
|
|
123
124
|
runner,
|
|
124
125
|
|
|
125
|
-
receiveTestResourceConfig: async function (
|
|
126
|
-
|
|
127
|
-
// name: "",
|
|
128
|
-
// fs: ".",
|
|
129
|
-
// ports: [],
|
|
130
|
-
// browserWSEndpoint: "",
|
|
131
|
-
// },
|
|
132
|
-
puppetMaster: PM
|
|
133
|
-
) {
|
|
134
|
-
// console.log(
|
|
135
|
-
// `testResourceConfiguration! ${JSON.stringify(
|
|
136
|
-
// testResourceConfiguration,
|
|
137
|
-
// null,
|
|
138
|
-
// 2
|
|
139
|
-
// )}`
|
|
140
|
-
// );
|
|
141
|
-
// console.log("puppetMaster", puppetMaster);
|
|
142
|
-
|
|
143
|
-
await puppetMaster
|
|
144
|
-
.mkdirSync
|
|
145
|
-
// ""
|
|
146
|
-
// puppetMaster.testResourceConfiguration.fs + "/"
|
|
147
|
-
();
|
|
148
|
-
// if (!puppetMaster.existsSync(destFolder)) {
|
|
149
|
-
// puppetMaster.mkdirSync(destFolder, { recursive: true });
|
|
150
|
-
// }
|
|
151
|
-
|
|
152
|
-
// puppetMaster.writeFileSync(
|
|
153
|
-
// // puppetMaster.testResourceConfiguration.fs + `/tests.json`,
|
|
154
|
-
// `tests.json`,
|
|
155
|
-
// JSON.stringify(this.toObj(), null, 2)
|
|
156
|
-
// );
|
|
126
|
+
receiveTestResourceConfig: async function (puppetMaster: PM) {
|
|
127
|
+
await puppetMaster.mkdirSync();
|
|
157
128
|
|
|
158
129
|
const logFilePath = "log.txt";
|
|
159
|
-
// puppetMaster.testResourceConfiguration.fs + `/log.txt`;
|
|
160
|
-
|
|
161
130
|
const access = await puppetMaster.createWriteStream(logFilePath);
|
|
162
|
-
|
|
163
|
-
// console.log("access", access);
|
|
164
131
|
const tLog = (...l: string[]) => {
|
|
165
|
-
// access.write(`${l.toString()}\n`);
|
|
166
|
-
// console.log("tLog", l);
|
|
167
132
|
puppetMaster.write(access, `${l.toString()}\n`);
|
|
168
133
|
};
|
|
169
134
|
|
|
@@ -182,6 +147,15 @@ export abstract class BaseBuilder<
|
|
|
182
147
|
}).length;
|
|
183
148
|
puppetMaster.writeFileSync(`exitcode`, numberOfFailures.toString());
|
|
184
149
|
|
|
150
|
+
// if (numberOfFailures > 0) {
|
|
151
|
+
// puppetMaster.writeFileSync(
|
|
152
|
+
// `prompt`,
|
|
153
|
+
// `
|
|
154
|
+
// aider --message "make a script that prints hello" hello.js
|
|
155
|
+
// `
|
|
156
|
+
// );
|
|
157
|
+
// }
|
|
158
|
+
|
|
185
159
|
puppetMaster.writeFileSync(
|
|
186
160
|
`tests.json`,
|
|
187
161
|
JSON.stringify(this.toObj(), null, 2)
|
package/src/lib/classBuilder.ts
CHANGED
|
@@ -17,7 +17,20 @@ import { PM } from "../PM/index.js";
|
|
|
17
17
|
import { ITTestResourceRequest } from "./index.js";
|
|
18
18
|
|
|
19
19
|
export abstract class ClassBuilder<
|
|
20
|
-
ITestShape extends IBaseTest
|
|
20
|
+
ITestShape extends IBaseTest<
|
|
21
|
+
unknown,
|
|
22
|
+
unknown,
|
|
23
|
+
unknown,
|
|
24
|
+
unknown,
|
|
25
|
+
unknown,
|
|
26
|
+
unknown,
|
|
27
|
+
unknown,
|
|
28
|
+
Record<string, any>,
|
|
29
|
+
Record<string, any>,
|
|
30
|
+
Record<string, any>,
|
|
31
|
+
Record<string, any>,
|
|
32
|
+
Record<string, any>
|
|
33
|
+
>
|
|
21
34
|
> extends BaseBuilder<ITestShape, any, any, any, any, any> {
|
|
22
35
|
constructor(
|
|
23
36
|
testImplementation: ITestImplementation<ITestShape, any>,
|
|
@@ -29,7 +42,6 @@ export abstract class ClassBuilder<
|
|
|
29
42
|
thenKlasser: IThenKlasser<ITestShape>,
|
|
30
43
|
checkKlasser: ICheckKlasser<ITestShape>,
|
|
31
44
|
testResourceRequirement: ITTestResourceRequest
|
|
32
|
-
// puppetMaster: PM
|
|
33
45
|
) {
|
|
34
46
|
const classySuites = Object.entries(testImplementation.suites).reduce(
|
|
35
47
|
(a, [key], index) => {
|
package/src/lib/core.ts
CHANGED
|
@@ -8,11 +8,8 @@ import {
|
|
|
8
8
|
import { ITestInterface } from "./types.js";
|
|
9
9
|
import {
|
|
10
10
|
DefaultTestInterface,
|
|
11
|
-
ILogWriter,
|
|
12
|
-
ITTestResourceConfiguration,
|
|
13
11
|
ITTestResourceRequest,
|
|
14
12
|
ITestArtifactory,
|
|
15
|
-
ITestJob,
|
|
16
13
|
defaultTestResourceRequirement,
|
|
17
14
|
} from "./index.js";
|
|
18
15
|
import {
|
|
@@ -26,7 +23,20 @@ import { ClassBuilder } from "./classBuilder.js";
|
|
|
26
23
|
import { PM } from "../PM/index";
|
|
27
24
|
|
|
28
25
|
export default abstract class Testeranto<
|
|
29
|
-
ITestShape extends IBaseTest
|
|
26
|
+
ITestShape extends IBaseTest<
|
|
27
|
+
unknown,
|
|
28
|
+
unknown,
|
|
29
|
+
unknown,
|
|
30
|
+
unknown,
|
|
31
|
+
unknown,
|
|
32
|
+
unknown,
|
|
33
|
+
unknown,
|
|
34
|
+
Record<string, any>,
|
|
35
|
+
Record<string, any>,
|
|
36
|
+
Record<string, any>,
|
|
37
|
+
Record<string, any>,
|
|
38
|
+
Record<string, any>
|
|
39
|
+
>
|
|
30
40
|
> extends ClassBuilder<ITestShape> {
|
|
31
41
|
constructor(
|
|
32
42
|
input: ITestShape["iinput"],
|
|
@@ -34,7 +44,6 @@ export default abstract class Testeranto<
|
|
|
34
44
|
testImplementation: ITestImplementation<ITestShape>,
|
|
35
45
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
|
|
36
46
|
testInterface: Partial<ITestInterface<ITestShape>>
|
|
37
|
-
// puppetMaster: PM
|
|
38
47
|
) {
|
|
39
48
|
const fullTestInterface = DefaultTestInterface(testInterface);
|
|
40
49
|
super(
|
|
@@ -146,12 +155,14 @@ export default abstract class Testeranto<
|
|
|
146
155
|
async butThen(
|
|
147
156
|
store: any,
|
|
148
157
|
thenCB,
|
|
149
|
-
testResourceConfiguration
|
|
158
|
+
testResourceConfiguration: any,
|
|
159
|
+
pm: PM
|
|
150
160
|
): Promise<ITestShape["iselection"]> {
|
|
151
161
|
return await fullTestInterface.butThen(
|
|
152
162
|
store,
|
|
153
163
|
thenCB,
|
|
154
|
-
testResourceConfiguration
|
|
164
|
+
testResourceConfiguration,
|
|
165
|
+
pm
|
|
155
166
|
);
|
|
156
167
|
}
|
|
157
168
|
} as any,
|
package/src/lib/index.ts
CHANGED
|
@@ -12,7 +12,22 @@ import { ITestInterface } from "./types.js";
|
|
|
12
12
|
|
|
13
13
|
// import { INodeUtils, ITestInterface, IUtils, IWebUtils } from "./types.js";
|
|
14
14
|
|
|
15
|
-
export const BaseTestInterface: ITestInterface<
|
|
15
|
+
export const BaseTestInterface: ITestInterface<
|
|
16
|
+
IBaseTest<
|
|
17
|
+
unknown,
|
|
18
|
+
unknown,
|
|
19
|
+
unknown,
|
|
20
|
+
unknown,
|
|
21
|
+
unknown,
|
|
22
|
+
unknown,
|
|
23
|
+
unknown,
|
|
24
|
+
Record<string, any>,
|
|
25
|
+
Record<string, any>,
|
|
26
|
+
Record<string, any>,
|
|
27
|
+
Record<string, any>,
|
|
28
|
+
Record<string, any>
|
|
29
|
+
>
|
|
30
|
+
> = {
|
|
16
31
|
beforeAll: async (s) => s,
|
|
17
32
|
beforeEach: async function (
|
|
18
33
|
subject: any,
|
|
@@ -24,8 +39,39 @@ export const BaseTestInterface: ITestInterface<IBaseTest> = {
|
|
|
24
39
|
return subject as any;
|
|
25
40
|
},
|
|
26
41
|
afterEach: async (s) => s,
|
|
27
|
-
afterAll: (
|
|
28
|
-
|
|
42
|
+
afterAll: (
|
|
43
|
+
store: IBaseTest<
|
|
44
|
+
unknown,
|
|
45
|
+
unknown,
|
|
46
|
+
unknown,
|
|
47
|
+
unknown,
|
|
48
|
+
unknown,
|
|
49
|
+
unknown,
|
|
50
|
+
unknown,
|
|
51
|
+
Record<string, any>,
|
|
52
|
+
Record<string, any>,
|
|
53
|
+
Record<string, any>,
|
|
54
|
+
Record<string, any>,
|
|
55
|
+
Record<string, any>
|
|
56
|
+
>["istore"]
|
|
57
|
+
) => undefined,
|
|
58
|
+
butThen: async (
|
|
59
|
+
store: IBaseTest<
|
|
60
|
+
unknown,
|
|
61
|
+
unknown,
|
|
62
|
+
unknown,
|
|
63
|
+
unknown,
|
|
64
|
+
unknown,
|
|
65
|
+
unknown,
|
|
66
|
+
unknown,
|
|
67
|
+
Record<string, any>,
|
|
68
|
+
Record<string, any>,
|
|
69
|
+
Record<string, any>,
|
|
70
|
+
Record<string, any>,
|
|
71
|
+
Record<string, any>
|
|
72
|
+
>["istore"],
|
|
73
|
+
thenCb
|
|
74
|
+
) => thenCb(store),
|
|
29
75
|
andWhen: (a) => a,
|
|
30
76
|
assertThis: () => null,
|
|
31
77
|
};
|
|
@@ -73,8 +119,38 @@ export type ITestArtificer = (key: string, data: any) => void;
|
|
|
73
119
|
type ITest = {
|
|
74
120
|
toObj(): object;
|
|
75
121
|
name: string;
|
|
76
|
-
givens: IGivens<
|
|
77
|
-
|
|
122
|
+
givens: IGivens<
|
|
123
|
+
IBaseTest<
|
|
124
|
+
unknown,
|
|
125
|
+
unknown,
|
|
126
|
+
unknown,
|
|
127
|
+
unknown,
|
|
128
|
+
unknown,
|
|
129
|
+
unknown,
|
|
130
|
+
unknown,
|
|
131
|
+
Record<string, any>,
|
|
132
|
+
Record<string, any>,
|
|
133
|
+
Record<string, any>,
|
|
134
|
+
Record<string, any>,
|
|
135
|
+
Record<string, any>
|
|
136
|
+
>
|
|
137
|
+
>;
|
|
138
|
+
checks: BaseCheck<
|
|
139
|
+
IBaseTest<
|
|
140
|
+
unknown,
|
|
141
|
+
unknown,
|
|
142
|
+
unknown,
|
|
143
|
+
unknown,
|
|
144
|
+
unknown,
|
|
145
|
+
unknown,
|
|
146
|
+
unknown,
|
|
147
|
+
Record<string, any>,
|
|
148
|
+
Record<string, any>,
|
|
149
|
+
Record<string, any>,
|
|
150
|
+
Record<string, any>,
|
|
151
|
+
Record<string, any>
|
|
152
|
+
>
|
|
153
|
+
>[];
|
|
78
154
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
79
155
|
};
|
|
80
156
|
|
|
@@ -84,7 +160,24 @@ export type ITestJob<T = PM> = {
|
|
|
84
160
|
runner: (
|
|
85
161
|
x: ITTestResourceConfiguration,
|
|
86
162
|
t: ITLog
|
|
87
|
-
) => Promise<
|
|
163
|
+
) => Promise<
|
|
164
|
+
BaseSuite<
|
|
165
|
+
IBaseTest<
|
|
166
|
+
unknown,
|
|
167
|
+
unknown,
|
|
168
|
+
unknown,
|
|
169
|
+
unknown,
|
|
170
|
+
unknown,
|
|
171
|
+
unknown,
|
|
172
|
+
unknown,
|
|
173
|
+
Record<string, any>,
|
|
174
|
+
Record<string, any>,
|
|
175
|
+
Record<string, any>,
|
|
176
|
+
Record<string, any>,
|
|
177
|
+
Record<string, any>
|
|
178
|
+
>
|
|
179
|
+
>
|
|
180
|
+
>;
|
|
88
181
|
testResourceRequirement: ITTestResourceRequirement;
|
|
89
182
|
receiveTestResourceConfig: (pm: PM) => Promise<{
|
|
90
183
|
failed: number;
|
|
@@ -101,7 +194,22 @@ export const defaultTestResourceRequirement: ITTestResourceRequest = {
|
|
|
101
194
|
|
|
102
195
|
export type ITestArtifactory = (key: string, value: unknown) => unknown;
|
|
103
196
|
|
|
104
|
-
export type ITestCheckCallback<
|
|
197
|
+
export type ITestCheckCallback<
|
|
198
|
+
ITestShape extends IBaseTest<
|
|
199
|
+
unknown,
|
|
200
|
+
unknown,
|
|
201
|
+
unknown,
|
|
202
|
+
unknown,
|
|
203
|
+
unknown,
|
|
204
|
+
unknown,
|
|
205
|
+
unknown,
|
|
206
|
+
Record<string, any>,
|
|
207
|
+
Record<string, any>,
|
|
208
|
+
Record<string, any>,
|
|
209
|
+
Record<string, any>,
|
|
210
|
+
Record<string, any>
|
|
211
|
+
>
|
|
212
|
+
> = {
|
|
105
213
|
[K in keyof ITestShape["checks"]]: (
|
|
106
214
|
name: string,
|
|
107
215
|
features: string[],
|
package/src/lib/types.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
|
|
|
19
19
|
export type IJsonConfig = {
|
|
20
20
|
outdir: string;
|
|
21
21
|
tests: ITestTypes[];
|
|
22
|
-
|
|
22
|
+
botEmail: string;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export type IBaseConfig = {
|
|
@@ -27,7 +27,6 @@ export type IBaseConfig = {
|
|
|
27
27
|
debugger: boolean;
|
|
28
28
|
devMode: boolean;
|
|
29
29
|
externals: string[];
|
|
30
|
-
features: string;
|
|
31
30
|
minify: boolean;
|
|
32
31
|
nodePlugins: any[];
|
|
33
32
|
outbase: string;
|
|
@@ -35,17 +34,34 @@ export type IBaseConfig = {
|
|
|
35
34
|
ports: string[];
|
|
36
35
|
tests: ITestTypes[];
|
|
37
36
|
webPlugins: any[];
|
|
37
|
+
botEmail: string;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type IBuiltConfig = { buildDir: string } & IBaseConfig;
|
|
41
41
|
|
|
42
|
-
export type IWebTestInterface<
|
|
42
|
+
export type IWebTestInterface<
|
|
43
|
+
ITestShape extends IBaseTest<
|
|
44
|
+
unknown,
|
|
45
|
+
unknown,
|
|
46
|
+
unknown,
|
|
47
|
+
unknown,
|
|
48
|
+
unknown,
|
|
49
|
+
unknown,
|
|
50
|
+
unknown,
|
|
51
|
+
Record<string, any>,
|
|
52
|
+
Record<string, any>,
|
|
53
|
+
Record<string, any>,
|
|
54
|
+
Record<string, any>,
|
|
55
|
+
Record<string, any>
|
|
56
|
+
>
|
|
57
|
+
> = {
|
|
43
58
|
assertThis: (x: ITestShape["then"]) => void;
|
|
44
59
|
|
|
45
60
|
andWhen: (
|
|
46
61
|
store: ITestShape["istore"],
|
|
47
62
|
whenCB: ITestShape["when"],
|
|
48
|
-
testResource: ITTestResourceConfiguration
|
|
63
|
+
testResource: ITTestResourceConfiguration,
|
|
64
|
+
utils: PM
|
|
49
65
|
) => Promise<ITestShape["istore"]>;
|
|
50
66
|
butThen: (
|
|
51
67
|
store: ITestShape["istore"],
|
|
@@ -81,17 +97,34 @@ export type IWebTestInterface<ITestShape extends IBaseTest> = {
|
|
|
81
97
|
};
|
|
82
98
|
// & ITestInterface<ITestShape>;
|
|
83
99
|
|
|
84
|
-
export type INodeTestInterface<
|
|
100
|
+
export type INodeTestInterface<
|
|
101
|
+
ITestShape extends IBaseTest<
|
|
102
|
+
unknown,
|
|
103
|
+
unknown,
|
|
104
|
+
unknown,
|
|
105
|
+
unknown,
|
|
106
|
+
unknown,
|
|
107
|
+
unknown,
|
|
108
|
+
unknown,
|
|
109
|
+
Record<string, any>,
|
|
110
|
+
Record<string, any>,
|
|
111
|
+
Record<string, any>,
|
|
112
|
+
Record<string, any>,
|
|
113
|
+
Record<string, any>
|
|
114
|
+
>
|
|
115
|
+
> = {
|
|
85
116
|
assertThis: (x: ITestShape["then"]) => void;
|
|
86
117
|
andWhen: (
|
|
87
118
|
store: ITestShape["istore"],
|
|
88
119
|
whenCB: ITestShape["when"],
|
|
89
|
-
testResource: ITTestResourceConfiguration
|
|
120
|
+
testResource: ITTestResourceConfiguration,
|
|
121
|
+
utils: PM
|
|
90
122
|
) => Promise<ITestShape["istore"]>;
|
|
91
123
|
butThen: (
|
|
92
124
|
store: ITestShape["istore"],
|
|
93
125
|
thenCB,
|
|
94
|
-
testResource: ITTestResourceConfiguration
|
|
126
|
+
testResource: ITTestResourceConfiguration,
|
|
127
|
+
utils: PM
|
|
95
128
|
) => Promise<ITestShape["iselection"]>;
|
|
96
129
|
afterAll: (
|
|
97
130
|
store: ITestShape["istore"],
|
|
@@ -115,13 +148,28 @@ export type INodeTestInterface<ITestShape extends IBaseTest> = {
|
|
|
115
148
|
initializer: (c?) => ITestShape["given"],
|
|
116
149
|
artificer: ITestArtificer,
|
|
117
150
|
testResource: ITTestResourceConfiguration,
|
|
118
|
-
initialValues
|
|
119
|
-
|
|
151
|
+
initialValues,
|
|
152
|
+
pm: PM
|
|
120
153
|
) => Promise<ITestShape["istore"]>;
|
|
121
154
|
};
|
|
122
155
|
// & ITestInterface<ITestShape>;
|
|
123
156
|
|
|
124
|
-
export type ITestInterface<
|
|
157
|
+
export type ITestInterface<
|
|
158
|
+
ITestShape extends IBaseTest<
|
|
159
|
+
unknown,
|
|
160
|
+
unknown,
|
|
161
|
+
unknown,
|
|
162
|
+
unknown,
|
|
163
|
+
unknown,
|
|
164
|
+
unknown,
|
|
165
|
+
unknown,
|
|
166
|
+
Record<string, any>,
|
|
167
|
+
Record<string, any>,
|
|
168
|
+
Record<string, any>,
|
|
169
|
+
Record<string, any>,
|
|
170
|
+
Record<string, any>
|
|
171
|
+
>
|
|
172
|
+
> = {
|
|
125
173
|
assertThis: (x: ITestShape["then"]) => void;
|
|
126
174
|
|
|
127
175
|
andWhen: (
|
|
@@ -133,7 +181,8 @@ export type ITestInterface<ITestShape extends IBaseTest> = {
|
|
|
133
181
|
butThen: (
|
|
134
182
|
store: ITestShape["istore"],
|
|
135
183
|
thenCB,
|
|
136
|
-
testResource: ITTestResourceConfiguration
|
|
184
|
+
testResource: ITTestResourceConfiguration,
|
|
185
|
+
pm: PM
|
|
137
186
|
) => Promise<ITestShape["iselection"]>;
|
|
138
187
|
|
|
139
188
|
afterAll: (
|
|
@@ -163,35 +212,92 @@ export type ITestInterface<ITestShape extends IBaseTest> = {
|
|
|
163
212
|
) => Promise<ITestShape["istore"]>;
|
|
164
213
|
};
|
|
165
214
|
|
|
166
|
-
export type ISuiteKlasser<
|
|
215
|
+
export type ISuiteKlasser<
|
|
216
|
+
ITestShape extends IBaseTest<
|
|
217
|
+
unknown,
|
|
218
|
+
unknown,
|
|
219
|
+
unknown,
|
|
220
|
+
unknown,
|
|
221
|
+
unknown,
|
|
222
|
+
unknown,
|
|
223
|
+
unknown,
|
|
224
|
+
Record<string, any>,
|
|
225
|
+
Record<string, any>,
|
|
226
|
+
Record<string, any>,
|
|
227
|
+
Record<string, any>,
|
|
228
|
+
Record<string, any>
|
|
229
|
+
>
|
|
230
|
+
> = (
|
|
167
231
|
name: string,
|
|
168
232
|
index: number,
|
|
169
233
|
givens: IGivens<ITestShape>,
|
|
170
234
|
checks: BaseCheck<ITestShape>[]
|
|
171
235
|
) => BaseSuite<ITestShape>;
|
|
172
236
|
|
|
173
|
-
export type IGivenKlasser<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
237
|
+
export type IGivenKlasser<
|
|
238
|
+
ITestShape extends IBaseTest<
|
|
239
|
+
unknown,
|
|
240
|
+
unknown,
|
|
241
|
+
unknown,
|
|
242
|
+
unknown,
|
|
243
|
+
unknown,
|
|
244
|
+
unknown,
|
|
245
|
+
unknown,
|
|
246
|
+
Record<string, any>,
|
|
247
|
+
Record<string, any>,
|
|
248
|
+
Record<string, any>,
|
|
249
|
+
Record<string, any>,
|
|
250
|
+
Record<string, any>
|
|
251
|
+
>
|
|
252
|
+
> = (name, features, whens, thens, givenCB) => BaseGiven<ITestShape>;
|
|
253
|
+
|
|
254
|
+
export type IWhenKlasser<
|
|
255
|
+
ITestShape extends IBaseTest<
|
|
256
|
+
unknown,
|
|
257
|
+
unknown,
|
|
258
|
+
unknown,
|
|
259
|
+
unknown,
|
|
260
|
+
unknown,
|
|
261
|
+
unknown,
|
|
262
|
+
unknown,
|
|
263
|
+
Record<string, any>,
|
|
264
|
+
Record<string, any>,
|
|
265
|
+
Record<string, any>,
|
|
266
|
+
Record<string, any>,
|
|
267
|
+
Record<string, any>
|
|
268
|
+
>
|
|
269
|
+
> = (s, o) => BaseWhen<ITestShape>;
|
|
270
|
+
|
|
271
|
+
export type IThenKlasser<
|
|
272
|
+
ITestShape extends IBaseTest<
|
|
273
|
+
unknown,
|
|
274
|
+
unknown,
|
|
275
|
+
unknown,
|
|
276
|
+
unknown,
|
|
277
|
+
unknown,
|
|
278
|
+
unknown,
|
|
279
|
+
unknown,
|
|
280
|
+
Record<string, any>,
|
|
281
|
+
Record<string, any>,
|
|
282
|
+
Record<string, any>,
|
|
283
|
+
Record<string, any>,
|
|
284
|
+
Record<string, any>
|
|
285
|
+
>
|
|
286
|
+
> = (s, o) => BaseThen<ITestShape>;
|
|
287
|
+
|
|
288
|
+
export type ICheckKlasser<
|
|
289
|
+
ITestShape extends IBaseTest<
|
|
290
|
+
unknown,
|
|
291
|
+
unknown,
|
|
292
|
+
unknown,
|
|
293
|
+
unknown,
|
|
294
|
+
unknown,
|
|
295
|
+
unknown,
|
|
296
|
+
unknown,
|
|
297
|
+
Record<string, any>,
|
|
298
|
+
Record<string, any>,
|
|
299
|
+
Record<string, any>,
|
|
300
|
+
Record<string, any>,
|
|
301
|
+
Record<string, any>
|
|
302
|
+
>
|
|
303
|
+
> = (n, f, cb, w, t) => BaseCheck<ITestShape>;
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import { configs } from "eslint-plugin-react";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
4
|
+
|
|
5
|
+
export const destinationOfRuntime = (
|
|
6
|
+
f: string,
|
|
7
|
+
r: IRunTime,
|
|
8
|
+
configs: IBuiltConfig
|
|
9
|
+
) => {
|
|
10
|
+
return path
|
|
11
|
+
.normalize(`${configs.buildDir}/${r}/${f}`)
|
|
12
|
+
.split(".")
|
|
13
|
+
.slice(0, -1)
|
|
14
|
+
.join(".");
|
|
15
|
+
};
|
package/testeranto.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
botEmail: "adamwong246@gmail.com",
|
|
3
|
+
taskman: "adamwong246/kokomobay-taskman",
|
|
4
|
+
outdir: "docs",
|
|
5
|
+
tests: [["./src/LoginButton.test.tsx", "web", { ports: 0 }, []]],
|
|
6
|
+
debugger: true,
|
|
7
|
+
clearScreen: false,
|
|
8
|
+
devMode: true,
|
|
9
|
+
minify: false,
|
|
10
|
+
outbase: ".",
|
|
11
|
+
ports: [],
|
|
12
|
+
externals: [],
|
|
13
|
+
};
|
package/tsconfig.common.json
CHANGED
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"jsx": "react",
|
|
19
19
|
"resolveJsonModule": true,
|
|
20
20
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"dom.iterable"
|
|
24
|
+
],
|
|
22
25
|
"skipLibCheck": true,
|
|
23
26
|
"strict": false,
|
|
24
27
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -30,6 +33,11 @@
|
|
|
30
33
|
"outDir": "dist/common/",
|
|
31
34
|
"alwaysStrict": true
|
|
32
35
|
},
|
|
33
|
-
"include": [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
"include": [
|
|
37
|
+
"./**/*.*ts",
|
|
38
|
+
"index.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"exclude": [
|
|
41
|
+
"node_modules"
|
|
42
|
+
]
|
|
43
|
+
}
|