testeranto 0.134.0 → 0.140.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/.aider.chat.history.md +14577 -0
- package/.aider.input.history +566 -0
- package/.aider.tags.cache.v3/{8d/fa/12860238755bcfab9af8a93c52ab.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{18/8b/7dfca822129dad10b5cacadf7728.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -423
- package/bundle.js +1 -1
- package/dist/common/src/CoreTypes.js +2 -0
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/PM/main.js +12 -7
- package/dist/common/src/PM/node.js +10 -3
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -72
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +2 -16
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +2 -16
- package/dist/common/src/lib/abstractBase.js +8 -1
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/classBuilder.js +2 -3
- package/dist/common/src/lib/core.js +2 -0
- package/dist/common/src/run.js +1 -1
- package/dist/common/src/utils/buildTemplates.js +88 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +4 -1
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/PM/main.js +12 -7
- package/dist/module/src/PM/node.js +10 -3
- package/dist/module/src/Project.js +41 -47
- package/dist/module/src/TestReport.js +34 -31
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/build.js +7 -72
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +2 -16
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +2 -16
- package/dist/module/src/lib/abstractBase.js +8 -1
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/classBuilder.js +2 -3
- package/dist/module/src/lib/core.js +2 -0
- package/dist/module/src/run.js +1 -1
- package/dist/module/src/utils/buildTemplates.js +82 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +77 -29
- package/dist/prebuild/TestReport.js +51 -32
- package/dist/prebuild/build.mjs +132 -131
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/prebuild/run.mjs +50 -31
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +53 -0
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/index.d.ts +1 -1
- package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
- package/dist/types/src/Pure.d.ts +3 -3
- package/dist/types/src/Types.d.ts +21 -61
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/abstractBase.d.ts +10 -16
- package/dist/types/src/lib/basebuilder.d.ts +3 -3
- package/dist/types/src/lib/classBuilder.d.ts +2 -2
- package/dist/types/src/lib/core.d.ts +2 -2
- package/dist/types/src/lib/index.d.ts +7 -6
- package/dist/types/src/lib/types.d.ts +8 -8
- package/dist/types/src/mothership/test.d.ts +2 -2
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +567 -0
- package/docs/style.md +116 -0
- package/docs.html +537 -0
- package/example.css +351 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
- package/index.html +245 -24
- package/logo.svg +72 -0
- package/package.json +11 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +152 -0
- package/src/Init.ts +4 -4
- package/src/Node.ts +13 -13
- package/src/PM/PM_WithEslintAndTsc.ts +46 -15
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
- package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
- package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +17 -16
- package/src/PM/node.ts +10 -10
- package/src/PM/nodeSidecar.ts +2 -2
- package/src/PM/pure.ts +0 -4
- package/src/Project.tsx +289 -292
- package/src/Pure.ts +13 -14
- package/src/PureSidecar.ts +1 -0
- package/src/TestReport.tsx +179 -165
- package/src/Types.ts +52 -151
- package/src/Web.ts +15 -14
- package/src/build.ts +22 -72
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +2 -18
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +2 -18
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +13 -163
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +13 -7
- package/src/lib/core.ts +13 -17
- package/src/lib/index.ts +21 -24
- package/src/lib/types.ts +23 -9
- package/src/mothership/test.ts +13 -10
- package/src/run.ts +1 -1
- package/src/style.css +1 -1
- package/src/utils/buildTemplates.ts +88 -0
- package/style.css +496 -0
- package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
- package/testeranto/bundles/node/allTests/metafile.json +4151 -0
- package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
- package/testeranto/dev.html +29 -0
- package/testeranto/index.html +28 -27
- package/testeranto/reports/allTests/config.json +57 -0
- package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
- package/testeranto/reports/allTests/index.html +26 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
- package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
- package/testeranto/reports/allTests/summary.json +37 -0
- package/testeranto.config.ts +16 -26
- package/tsc.log +66 -69
- package/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- package/dist/common/src/SP__Polygon.test.js +0 -10
- package/dist/module/src/ReportClient.js +0 -132
- package/dist/module/src/SP__Polygon.test.js +0 -8
- package/dist/prebuild/ReportClient.js +0 -3
- package/src/ReportClient.tsx +0 -164
- package/src/SP__Polygon.test.ts +0 -13
- package/testeranto/ReportClient.css +0 -11367
- package/testeranto/ReportClient.js +0 -24641
- package/testeranto/bundles/node/mothership/metafile.json +0 -389
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
- package/testeranto/reports/mothership/config.json +0 -25
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
- package/testeranto/reports/mothership/summary.json +0 -9
- /package/dist/{types/src/SP__Polygon.test.d.ts → module/src/CoreTypes.js} +0 -0
- /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
- /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
- /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import baseEsBuildConfig from "./index.js";
|
|
2
2
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
3
3
|
import featuresPlugin from "./featuresPlugin";
|
|
4
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
4
5
|
export default (config, entryPoints, testName) => {
|
|
5
6
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("node", testName);
|
|
6
7
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
@@ -14,22 +15,7 @@ export default (config, entryPoints, testName) => {
|
|
|
14
15
|
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
15
16
|
featuresPlugin,
|
|
16
17
|
inputFilesPluginFactory,
|
|
17
|
-
|
|
18
|
-
name: "rebuild-notify",
|
|
19
|
-
setup: (build) => {
|
|
20
|
-
build.onStart(() => {
|
|
21
|
-
console.log(`> node build starting...`);
|
|
22
|
-
});
|
|
23
|
-
build.onEnd((result) => {
|
|
24
|
-
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
25
|
-
if (result.errors.length > 0) {
|
|
26
|
-
console.log(result);
|
|
27
|
-
}
|
|
28
|
-
// console.log(result);
|
|
29
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
},
|
|
18
|
+
rebuildPlugin("node"),
|
|
33
19
|
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
34
20
|
] });
|
|
35
21
|
};
|
|
@@ -3,6 +3,7 @@ import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
|
3
3
|
import featuresPlugin from "./featuresPlugin.js";
|
|
4
4
|
import { isBuiltin } from "node:module";
|
|
5
5
|
import { consoleDetectorPlugin } from "./consoleDetectorPlugin.js";
|
|
6
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
6
7
|
export default (config, entryPoints, testName) => {
|
|
7
8
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("pure", testName);
|
|
8
9
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { drop: [], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
@@ -28,22 +29,7 @@ export default (config, entryPoints, testName) => {
|
|
|
28
29
|
});
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
|
-
|
|
32
|
-
name: "rebuild-notify",
|
|
33
|
-
setup: (build) => {
|
|
34
|
-
build.onStart(() => {
|
|
35
|
-
console.log(`> pure build starting...`);
|
|
36
|
-
});
|
|
37
|
-
build.onEnd((result) => {
|
|
38
|
-
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
39
|
-
if (result.errors.length > 0) {
|
|
40
|
-
console.log(result);
|
|
41
|
-
}
|
|
42
|
-
// console.log(result);
|
|
43
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
},
|
|
32
|
+
rebuildPlugin("pure"),
|
|
47
33
|
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
48
34
|
[]),
|
|
49
35
|
] });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
export default (r) => {
|
|
3
|
+
return {
|
|
4
|
+
name: "rebuild-notify",
|
|
5
|
+
setup: (build) => {
|
|
6
|
+
build.onStart(() => {
|
|
7
|
+
console.log(`> web build starting...`);
|
|
8
|
+
});
|
|
9
|
+
build.onEnd((result) => {
|
|
10
|
+
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
11
|
+
if (result.errors.length > 0) {
|
|
12
|
+
fs.writeFileSync(`./testeranto/reports${r}_build_errors`, JSON.stringify(result, null, 2));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -3,6 +3,7 @@ import path from "path";
|
|
|
3
3
|
import baseEsBuildConfig from "./index.js";
|
|
4
4
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
5
5
|
import featuresPlugin from "./featuresPlugin.js";
|
|
6
|
+
import rebuildPlugin from "./rebuildPlugin.js";
|
|
6
7
|
export default (config, entryPoints, testName) => {
|
|
7
8
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("web", testName);
|
|
8
9
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { treeShaking: true, outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
@@ -36,22 +37,7 @@ export default (config, entryPoints, testName) => {
|
|
|
36
37
|
// 'fs': false,
|
|
37
38
|
// }
|
|
38
39
|
}),
|
|
39
|
-
|
|
40
|
-
name: "rebuild-notify",
|
|
41
|
-
setup: (build) => {
|
|
42
|
-
build.onStart(() => {
|
|
43
|
-
console.log(`> web build starting...`);
|
|
44
|
-
});
|
|
45
|
-
build.onEnd((result) => {
|
|
46
|
-
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
47
|
-
if (result.errors.length > 0) {
|
|
48
|
-
console.log(result);
|
|
49
|
-
}
|
|
50
|
-
// console.log(result);
|
|
51
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
},
|
|
40
|
+
rebuildPlugin("web"),
|
|
55
41
|
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
56
42
|
] });
|
|
57
43
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
3
|
import { afterAllProxy, afterEachProxy, andWhenProxy, beforeAllProxy, beforeEachProxy, butThenProxy, } from "./pmProxy.js";
|
|
2
4
|
export class BaseSuite {
|
|
3
5
|
constructor(name, index, givens = {}, checks = []) {
|
|
@@ -101,7 +103,12 @@ export class BaseGiven {
|
|
|
101
103
|
return {
|
|
102
104
|
key: this.key,
|
|
103
105
|
name: this.name,
|
|
104
|
-
whens: this.whens.map((w) =>
|
|
106
|
+
whens: this.whens.map((w) => {
|
|
107
|
+
if (w && w.toObj)
|
|
108
|
+
return w.toObj();
|
|
109
|
+
console.error("w is not as expected!", w);
|
|
110
|
+
return {};
|
|
111
|
+
}),
|
|
105
112
|
thens: this.thens.map((t) => t.toObj()),
|
|
106
113
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
107
114
|
failed: this.failed,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
|
+
/* eslint-disable no-async-promise-executor */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
5
|
export class BaseBuilder {
|
|
2
6
|
constructor(input, suitesOverrides, givenOverides, whenOverides, thenOverides, checkOverides, testResourceRequirement, testSpecification) {
|
|
3
7
|
this.artifacts = [];
|
|
@@ -9,14 +9,13 @@ export class ClassBuilder extends BaseBuilder {
|
|
|
9
9
|
}, {});
|
|
10
10
|
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
11
11
|
a[key] = (features, whens, thens, ...initialValues) => {
|
|
12
|
-
// console.log("givEn", givEn.toString());
|
|
13
12
|
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key], initialValues);
|
|
14
13
|
};
|
|
15
14
|
return a;
|
|
16
15
|
}, {});
|
|
17
16
|
const classyWhens = Object.entries(testImplementation.whens).reduce((a, [key, whEn]) => {
|
|
18
|
-
a[key] = (payload) => {
|
|
19
|
-
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(payload));
|
|
17
|
+
a[key] = (...payload) => {
|
|
18
|
+
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(...payload));
|
|
20
19
|
};
|
|
21
20
|
return a;
|
|
22
21
|
}, {});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
3
|
import { DefaultTestInterface, defaultTestResourceRequirement, } from "./index.js";
|
|
2
4
|
import { BaseSuite, BaseGiven, BaseWhen, BaseThen, BaseCheck, } from "./abstractBase.js";
|
|
3
5
|
import { ClassBuilder } from "./classBuilder.js";
|
package/dist/module/src/run.js
CHANGED
|
@@ -11,7 +11,7 @@ process.stdin.on("keypress", (str, key) => {
|
|
|
11
11
|
process.exit(-1);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
|
|
14
|
+
const testName = process.argv[2];
|
|
15
15
|
const mode = process.argv[3];
|
|
16
16
|
if (mode !== "once" && mode !== "dev") {
|
|
17
17
|
console.error("the 2nd argument should be 'dev' or 'once' ");
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const testReportPage = (packageName, domain) => {
|
|
2
|
+
return `
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
<meta name="description" content="Webpage description goes here" />
|
|
8
|
+
<meta charset="utf-8" />
|
|
9
|
+
<title>${packageName} - testeranto</title>
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
11
|
+
<meta name="author" content="" />
|
|
12
|
+
|
|
13
|
+
<base href="${domain}" target="_blank">
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../ReportClient.css" />
|
|
16
|
+
<script type="module" src="../ReportClient.js"></script>
|
|
17
|
+
|
|
18
|
+
</head>
|
|
19
|
+
|
|
20
|
+
<body>
|
|
21
|
+
<div id="root">
|
|
22
|
+
react is loading
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
27
|
+
`;
|
|
28
|
+
};
|
|
29
|
+
export const testsReportPage = (packageName, domain, projects) => {
|
|
30
|
+
return `
|
|
31
|
+
<!DOCTYPE html>
|
|
32
|
+
<html lang="en">
|
|
33
|
+
|
|
34
|
+
<head>
|
|
35
|
+
<meta name="description" content="Webpage description goes here" />
|
|
36
|
+
<meta charset="utf-8" />
|
|
37
|
+
<title>${packageName} - testeranto</title>
|
|
38
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
39
|
+
<meta name="author" content="" />
|
|
40
|
+
<base href="${domain}" target="_blank">
|
|
41
|
+
|
|
42
|
+
<script type="application/json" id="bigConfig">
|
|
43
|
+
${JSON.stringify(Object.keys(projects))}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<link rel="stylesheet" href="./testeranto/Project.css" />
|
|
47
|
+
<script type="module" src="./testeranto/Project.js"></script>
|
|
48
|
+
|
|
49
|
+
</head>
|
|
50
|
+
|
|
51
|
+
<body>
|
|
52
|
+
<div id="root">
|
|
53
|
+
react is loading
|
|
54
|
+
</div>
|
|
55
|
+
</body>
|
|
56
|
+
|
|
57
|
+
</html>
|
|
58
|
+
`;
|
|
59
|
+
};
|
|
60
|
+
export const idkPage = (testName, domain) => {
|
|
61
|
+
return `
|
|
62
|
+
<!DOCTYPE html>
|
|
63
|
+
<html lang="en">
|
|
64
|
+
|
|
65
|
+
<head>
|
|
66
|
+
<meta name="description" content="Webpage description goes here" />
|
|
67
|
+
<base href="${domain}" target="_blank">
|
|
68
|
+
<meta charset="utf-8" />
|
|
69
|
+
<title>${testName} - testeranto</title>
|
|
70
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
71
|
+
<meta name="author" content="" />
|
|
72
|
+
|
|
73
|
+
<link rel="stylesheet" href="./testeranto/TestReport.css" />
|
|
74
|
+
<script src="./testeranto/TestReport.js"></script>
|
|
75
|
+
|
|
76
|
+
</head>
|
|
77
|
+
|
|
78
|
+
<body>
|
|
79
|
+
<div id="root"/>
|
|
80
|
+
</body>
|
|
81
|
+
`;
|
|
82
|
+
};
|