testeranto 0.94.0 → 0.110.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/README.md +1 -0
- package/bundle.js +80 -33
- package/dist/common/{src/Init.js → Init.js} +28 -0
- package/dist/common/{src/PM → PM}/main.js +272 -111
- package/dist/common/{src/PM → PM}/node.js +20 -5
- package/dist/common/{src/PM → PM}/web.js +19 -4
- package/dist/common/ReportServer.js +22 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/index.js +0 -12
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +1 -1
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +41 -30
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +18 -14
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +17 -7
- package/dist/common/build.js +222 -0
- package/dist/common/{src/defaultConfig.js → defaultConfig.js} +1 -0
- package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
- package/dist/common/{src/init-docs.js → init-docs.js} +20 -10
- package/dist/common/{src/lib → lib}/abstractBase.js +20 -92
- package/dist/common/{src/lib → lib}/basebuilder.js +23 -10
- package/dist/common/{src/lib → lib}/classBuilder.js +1 -3
- package/dist/common/{src/lib → lib}/core.js +26 -10
- package/dist/common/{src/lib → lib}/index.js +0 -1
- package/dist/common/run.js +297 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +43 -0
- package/dist/module/Footer.js +4 -0
- package/dist/module/Init.js +63 -0
- package/dist/module/{src/PM → PM}/main.js +253 -102
- package/dist/module/{src/PM → PM}/node.js +20 -5
- package/dist/module/{src/PM → PM}/web.js +19 -4
- package/dist/module/ReportClient.js +97 -0
- package/dist/module/ReportServer.js +17 -0
- package/dist/module/SubPackages/react/jsx/index.js +15 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +3 -3
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +24 -23
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +1 -7
- package/dist/module/TestReport.js +91 -0
- package/dist/module/build.js +184 -0
- package/dist/module/{src/defaultConfig.js → defaultConfig.js} +1 -0
- package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
- package/dist/module/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
- package/dist/module/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
- package/dist/module/{src/init-docs.js → init-docs.js} +1 -1
- package/dist/module/{src/lib → lib}/abstractBase.js +20 -92
- package/dist/module/{src/lib → lib}/basebuilder.js +23 -10
- package/dist/module/{src/lib → lib}/classBuilder.js +1 -3
- package/dist/module/{src/lib → lib}/core.js +26 -10
- package/dist/module/{src/lib → lib}/index.js +0 -1
- package/dist/module/run.js +259 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +29 -0
- package/dist/prebuild/ReportClient.css +11367 -0
- package/dist/prebuild/ReportClient.js +23641 -0
- package/dist/prebuild/ReportServer.mjs +16 -0
- package/dist/prebuild/TestReport.css +11367 -0
- package/dist/prebuild/TestReport.js +27484 -0
- package/dist/prebuild/build.mjs +376 -0
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
- package/dist/prebuild/init-docs.mjs +64 -8
- package/dist/prebuild/{run-tests.mjs → run.mjs} +501 -182
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Node.d.ts +12 -0
- package/dist/types/{src/PM → PM}/index.d.ts +11 -3
- package/dist/types/{src/PM → PM}/main.d.ts +24 -15
- package/dist/types/{src/PM → PM}/node.d.ts +11 -6
- package/dist/types/{src/PM → PM}/web.d.ts +11 -7
- 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 +11 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -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 +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -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 +5 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
- package/dist/types/Types.d.ts +61 -0
- package/dist/types/Web.d.ts +9 -0
- package/dist/types/defaultConfig.d.ts +3 -0
- package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/index.d.ts +1 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/inputFilesPlugin.d.ts +0 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/node.d.ts +1 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/web.d.ts +1 -1
- package/dist/types/lib/abstractBase.d.ts +110 -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 +7 -0
- package/dist/types/lib/index.d.ts +83 -0
- package/dist/types/lib/types.d.ts +14 -0
- package/dist/types/run.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +9 -0
- package/package.json +50 -39
- package/src/Footer.tsx +4 -0
- package/src/Init.ts +48 -0
- package/src/Node.ts +23 -17
- package/src/PM/index.ts +13 -9
- package/src/PM/main.ts +337 -139
- package/src/PM/node.ts +43 -8
- package/src/PM/web.ts +34 -6
- package/src/ReportClient.tsx +155 -0
- package/src/ReportServer.ts +21 -0
- package/src/SubPackages/react/component/node.ts +68 -24
- package/src/SubPackages/react/component/web.ts +68 -25
- package/src/SubPackages/react/jsx/index.ts +39 -18
- package/src/SubPackages/react/jsx/node.ts +23 -10
- package/src/SubPackages/react/jsx/web.ts +27 -14
- package/src/SubPackages/react-dom/component/node.ts +42 -50
- package/src/SubPackages/react-dom/component/web.ts +28 -10
- package/src/SubPackages/react-dom/jsx/node.ts +54 -56
- package/src/SubPackages/react-dom/jsx/web.ts +55 -42
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
- package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
- package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
- package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
- package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
- package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
- package/src/SubPackages/react-test-renderer/jsx/node.ts +22 -5
- package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
- package/src/TestReport.tsx +176 -0
- package/src/Types.ts +131 -129
- package/src/Web.ts +24 -18
- package/src/build.ts +240 -0
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
- package/src/esbuildConfigs/featuresPlugin.ts +0 -1
- package/src/esbuildConfigs/index.ts +1 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +2 -114
- package/src/esbuildConfigs/node.ts +7 -19
- package/src/esbuildConfigs/web.ts +6 -21
- package/src/init-docs.ts +2 -1
- package/src/lib/abstractBase.ts +140 -195
- package/src/lib/basebuilder.ts +57 -45
- package/src/lib/classBuilder.ts +15 -15
- package/src/lib/core.ts +44 -35
- package/src/lib/index.ts +47 -98
- package/src/lib/readme.md +12 -0
- package/src/lib/types.ts +40 -231
- package/src/run.ts +398 -0
- package/src/style.css +8 -0
- package/src/utils.ts +74 -2
- package/tsc.log +106 -0
- package/Bundle.Dockerfile +0 -52
- package/bin/init-docs.js +0 -24
- package/dist/common/dist/module/src/Init.js +0 -40
- package/dist/common/src/Aider.js +0 -143
- package/dist/common/src/Project.js +0 -227
- package/dist/common/src/Puppeteer.js +0 -111
- package/dist/common/src/SubPackages/puppeteer.js +0 -21
- package/dist/common/src/build-tests.js +0 -39
- package/dist/common/src/esbuildConfigs/features.js +0 -14
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -87
- package/dist/common/src/esbuildConfigs/report.js +0 -14
- package/dist/common/src/esbuildConfigs/tests.js +0 -13
- package/dist/common/src/run-tests.js +0 -39
- package/dist/common/src/utils.js +0 -16
- package/dist/common/testeranto.js +0 -15
- package/dist/module/src/Aider.js +0 -136
- package/dist/module/src/Init.js +0 -35
- package/dist/module/src/Project.js +0 -220
- package/dist/module/src/Puppeteer.js +0 -106
- package/dist/module/src/SubPackages/puppeteer.js +0 -16
- package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
- package/dist/module/src/build-tests.js +0 -11
- package/dist/module/src/esbuildConfigs/features.js +0 -12
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -82
- package/dist/module/src/esbuildConfigs/report.js +0 -14
- package/dist/module/src/esbuildConfigs/tests.js +0 -11
- package/dist/module/src/run-tests.js +0 -11
- package/dist/module/src/utils.js +0 -9
- package/dist/module/testeranto.js +0 -13
- package/dist/prebuild/build-tests.mjs +0 -553
- package/dist/types/dist/module/src/Init.d.ts +0 -2
- package/dist/types/src/Aider.d.ts +0 -1
- package/dist/types/src/Node.d.ts +0 -13
- package/dist/types/src/Project.d.ts +0 -12
- package/dist/types/src/Puppeteer.d.ts +0 -2
- package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
- package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
- package/dist/types/src/Types.d.ts +0 -51
- package/dist/types/src/Web.d.ts +0 -10
- package/dist/types/src/defaultConfig.d.ts +0 -3
- package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
- package/dist/types/src/lib/abstractBase.d.ts +0 -110
- package/dist/types/src/lib/basebuilder.d.ts +0 -27
- package/dist/types/src/lib/classBuilder.d.ts +0 -7
- package/dist/types/src/lib/core.d.ts +0 -8
- package/dist/types/src/lib/index.d.ts +0 -60
- package/dist/types/src/lib/types.d.ts +0 -68
- package/dist/types/src/utils.d.ts +0 -2
- package/dist/types/testeranto.d.ts +0 -16
- package/docker-compose.yml +0 -37
- package/src/Aider.ts +0 -168
- package/src/Project.ts +0 -292
- package/src/Puppeteer.ts +0 -143
- package/src/SubPackages/puppeteer.ts +0 -51
- package/src/build-tests.ts +0 -12
- package/src/esbuildConfigs/features.ts +0 -17
- package/src/esbuildConfigs/report.ts +0 -15
- package/src/esbuildConfigs/tests.ts +0 -14
- package/src/run-tests.ts +0 -12
- package/testeranto.ts +0 -13
- package/dist/common/{src/Node.js → Node.js} +0 -0
- package/dist/common/{src/PM → PM}/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- package/dist/common/{src/Types.js → Types.js} +0 -0
- package/dist/common/{src/Web.js → Web.js} +0 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
- package/dist/common/{src/lib → lib}/types.js +0 -0
- package/dist/common/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
- package/dist/common/{src/web.html.js → web.html.js} +0 -0
- package/dist/module/{src/Node.js → Node.js} +0 -0
- package/dist/module/{src/PM → PM}/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
- /package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{src/Types.js → Types.js} +0 -0
- /package/dist/module/{src/Web.js → Web.js} +0 -0
- /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
- /package/dist/module/{src/lib → lib}/types.js +0 -0
- /package/dist/module/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
- /package/dist/module/{src/web.html.js → web.html.js} +0 -0
- /package/dist/types/{src/Init.d.ts → Init.d.ts} +0 -0
- /package/dist/types/{src/build-tests.d.ts → ReportServer.d.ts} +0 -0
- /package/dist/types/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
- /package/dist/types/{src/init-docs.d.ts → build.d.ts} +0 -0
- /package/dist/types/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{src/run-tests.d.ts → init-docs.d.ts} +0 -0
- /package/dist/types/{src/puppeteerConfiger.d.ts → puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{src/web.html.d.ts → web.html.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
const otherInputs = {};
|
|
3
|
+
const register = (entrypoint, sources) => {
|
|
4
|
+
if (!otherInputs[entrypoint]) {
|
|
5
|
+
otherInputs[entrypoint] = new Set();
|
|
6
|
+
}
|
|
7
|
+
sources.forEach((s) => otherInputs[entrypoint].add(s));
|
|
8
|
+
};
|
|
9
|
+
export default (platform, entryPoints) => {
|
|
10
|
+
return {
|
|
11
|
+
register,
|
|
12
|
+
inputFilesPluginFactory: {
|
|
13
|
+
name: "metafileWriter",
|
|
14
|
+
setup(build) {
|
|
15
|
+
build.onEnd((result) => {
|
|
16
|
+
// console.log("build.onEnd", entryPoints);
|
|
17
|
+
fs.writeFileSync(`docs/${platform}/metafile.json`, JSON.stringify(result, null, 2));
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -3,8 +3,6 @@ import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
|
3
3
|
import featuresPlugin from "./featuresPlugin";
|
|
4
4
|
export default (config, entryPoints) => {
|
|
5
5
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("node", entryPoints);
|
|
6
|
-
// const inputFilesPluginFactory = inputFilesPlugin("node", entryPoints);
|
|
7
|
-
// const register = (x) => x;
|
|
8
6
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
9
7
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
10
8
|
metafile: true, supported: {
|
|
@@ -13,24 +11,14 @@ export default (config, entryPoints) => {
|
|
|
13
11
|
"process.env.FLUENTFFMPEG_COV": "0",
|
|
14
12
|
}, absWorkingDir: process.cwd(), banner: {
|
|
15
13
|
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
16
|
-
}, platform: "node", external: [
|
|
17
|
-
// "testeranto.json",
|
|
18
|
-
// "features.test.js",
|
|
19
|
-
"react",
|
|
20
|
-
// "events",
|
|
21
|
-
// "ganache"
|
|
22
|
-
...config.externals,
|
|
23
|
-
], entryPoints: [...entryPoints], plugins: [
|
|
14
|
+
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
24
15
|
featuresPlugin,
|
|
25
|
-
// markdownPlugin({}),
|
|
26
|
-
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
27
16
|
inputFilesPluginFactory,
|
|
28
|
-
// inputFilesPlugin("node", entryPoints),
|
|
29
17
|
{
|
|
30
18
|
name: "rebuild-notify",
|
|
31
19
|
setup(build) {
|
|
32
20
|
build.onEnd((result) => {
|
|
33
|
-
console.log(
|
|
21
|
+
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
34
22
|
if (result.errors.length > 0) {
|
|
35
23
|
console.log(result);
|
|
36
24
|
}
|
|
@@ -39,5 +27,6 @@ export default (config, entryPoints) => {
|
|
|
39
27
|
});
|
|
40
28
|
},
|
|
41
29
|
},
|
|
30
|
+
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
42
31
|
] });
|
|
43
32
|
};
|
|
@@ -4,19 +4,9 @@ import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
|
4
4
|
import featuresPlugin from "./featuresPlugin.js";
|
|
5
5
|
export default (config, entryPoints) => {
|
|
6
6
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("web", entryPoints);
|
|
7
|
-
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), {
|
|
8
|
-
// inject: ["./node_modules/testeranto/dist/cjs-shim.js"],
|
|
9
|
-
// banner: {
|
|
10
|
-
// js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
11
|
-
// },
|
|
12
|
-
// splitting: true,
|
|
13
|
-
outdir: config.outdir + "/web", alias: {
|
|
7
|
+
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { outdir: config.outdir + "/web", alias: {
|
|
14
8
|
react: path.resolve("./node_modules/react"),
|
|
15
9
|
}, metafile: true, external: [
|
|
16
|
-
// "testeranto.json",
|
|
17
|
-
// "features.test.ts",
|
|
18
|
-
// "url",
|
|
19
|
-
// "react",
|
|
20
10
|
"path",
|
|
21
11
|
"fs",
|
|
22
12
|
"stream",
|
|
@@ -36,14 +26,12 @@ export default (config, entryPoints) => {
|
|
|
36
26
|
"dns",
|
|
37
27
|
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
38
28
|
featuresPlugin,
|
|
39
|
-
// markdownPlugin({}),
|
|
40
|
-
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
41
29
|
inputFilesPluginFactory,
|
|
42
30
|
{
|
|
43
31
|
name: "rebuild-notify",
|
|
44
32
|
setup(build) {
|
|
45
33
|
build.onEnd((result) => {
|
|
46
|
-
console.log(
|
|
34
|
+
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
47
35
|
if (result.errors.length > 0) {
|
|
48
36
|
console.log(result);
|
|
49
37
|
}
|
|
@@ -52,5 +40,6 @@ export default (config, entryPoints) => {
|
|
|
52
40
|
});
|
|
53
41
|
},
|
|
54
42
|
},
|
|
43
|
+
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
55
44
|
] });
|
|
56
45
|
};
|
|
@@ -50,13 +50,14 @@ export class BaseSuite {
|
|
|
50
50
|
const beforeAllProxy = new Proxy(pm, {
|
|
51
51
|
get(target, prop, receiver) {
|
|
52
52
|
if (prop === "customScreenShot") {
|
|
53
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
|
|
53
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
|
|
54
54
|
// path: `${filepath}/${opts.path}`,
|
|
55
|
-
path: `suite-${sNdx}/beforeAll/${opts.path}` }));
|
|
55
|
+
path: `suite-${sNdx}/beforeAll/${opts.path}` }), p);
|
|
56
56
|
}
|
|
57
57
|
if (prop === "writeFileSync") {
|
|
58
58
|
return (fp, contents) => target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
|
|
59
59
|
}
|
|
60
|
+
/* @ts-ignore:next-line */
|
|
60
61
|
return Reflect.get(...arguments);
|
|
61
62
|
},
|
|
62
63
|
});
|
|
@@ -142,17 +143,21 @@ export class BaseGiven {
|
|
|
142
143
|
this.key = key;
|
|
143
144
|
tLog(`\n ${this.key}`);
|
|
144
145
|
tLog(`\n Given: ${this.name}`);
|
|
145
|
-
const givenArtifactory = (fPath, value) => artifactory(`given-${
|
|
146
|
+
const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
|
|
146
147
|
try {
|
|
147
148
|
// tLog(`\n Given this.store`, this.store);
|
|
148
149
|
const beforeEachProxy = new Proxy(pm, {
|
|
149
150
|
get(target, prop, receiver) {
|
|
150
151
|
if (prop === "writeFileSync") {
|
|
151
|
-
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${
|
|
152
|
+
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`, contents);
|
|
152
153
|
}
|
|
153
154
|
if (prop === "customScreenShot") {
|
|
154
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${
|
|
155
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
155
156
|
}
|
|
157
|
+
if (prop === "screencast") {
|
|
158
|
+
return (opts, p) => target.screencast(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
159
|
+
}
|
|
160
|
+
/* @ts-ignore:next-line */
|
|
156
161
|
return Reflect.get(...arguments);
|
|
157
162
|
},
|
|
158
163
|
});
|
|
@@ -163,10 +168,10 @@ export class BaseGiven {
|
|
|
163
168
|
});
|
|
164
169
|
this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, beforeEachProxy);
|
|
165
170
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
166
|
-
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${
|
|
171
|
+
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
|
|
167
172
|
}
|
|
168
173
|
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
169
|
-
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${
|
|
174
|
+
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
|
|
170
175
|
tester(t);
|
|
171
176
|
}
|
|
172
177
|
}
|
|
@@ -182,11 +187,12 @@ export class BaseGiven {
|
|
|
182
187
|
const afterEachProxy = new Proxy(pm, {
|
|
183
188
|
get(target, prop, receiver) {
|
|
184
189
|
if (prop === "customScreenShot") {
|
|
185
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${
|
|
190
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/afterEach/${opts.path}` }), p);
|
|
186
191
|
}
|
|
187
192
|
if (prop === "writeFileSync") {
|
|
188
|
-
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${
|
|
193
|
+
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/afterEach/${fp}`, contents);
|
|
189
194
|
}
|
|
195
|
+
/* @ts-ignore:next-line */
|
|
190
196
|
return Reflect.get(...arguments);
|
|
191
197
|
},
|
|
192
198
|
});
|
|
@@ -218,91 +224,12 @@ export class BaseWhen {
|
|
|
218
224
|
const andWhenProxy = new Proxy(pm, {
|
|
219
225
|
get(target, prop, receiver) {
|
|
220
226
|
if (prop === "customScreenShot") {
|
|
221
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }));
|
|
227
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }), p);
|
|
222
228
|
}
|
|
223
229
|
if (prop === "writeFileSync") {
|
|
224
230
|
return (fp, contents) => target[prop](`${filepath}/andWhen/${fp}`, contents);
|
|
225
231
|
}
|
|
226
|
-
|
|
227
|
-
// if (prop === "browser") {
|
|
228
|
-
// return new Proxy(target[prop], {
|
|
229
|
-
// get(bTarget, bProp, bReceiver) {
|
|
230
|
-
// if (bProp === "pages") {
|
|
231
|
-
// return async () => {
|
|
232
|
-
// return bTarget.pages().then((pages) => {
|
|
233
|
-
// return pages.map((page) => {
|
|
234
|
-
// return new Proxy(page, {
|
|
235
|
-
// get(pTarget, pProp, pReciever) {
|
|
236
|
-
// // console.log("mark get", pTarget, pProp, pReciever);
|
|
237
|
-
// if (pProp === "screenshot") {
|
|
238
|
-
// return async (x) => {
|
|
239
|
-
// return pm.customScreenShot(
|
|
240
|
-
// {
|
|
241
|
-
// ...x,
|
|
242
|
-
// path:
|
|
243
|
-
// `${testResourceConfiguration.fs}/${key}/afterEach` +
|
|
244
|
-
// "/" +
|
|
245
|
-
// x.path,
|
|
246
|
-
// },
|
|
247
|
-
// page
|
|
248
|
-
// );
|
|
249
|
-
// };
|
|
250
|
-
// } else if (pProp === "mainFrame") {
|
|
251
|
-
// return () => pTarget[pProp]();
|
|
252
|
-
// // return target[pProp];
|
|
253
|
-
// // return Reflect.get(...arguments);
|
|
254
|
-
// } else if (pProp === "exposeFunction") {
|
|
255
|
-
// // return Reflect.get(target, prop, receiver);
|
|
256
|
-
// return pTarget[pProp].bind(pTarget);
|
|
257
|
-
// // return target[pProp];
|
|
258
|
-
// } else if (pProp === "removeExposedFunction") {
|
|
259
|
-
// // return Reflect.get(target, prop, receiver);
|
|
260
|
-
// return pTarget[pProp].bind(pTarget);
|
|
261
|
-
// // return target[pProp];
|
|
262
|
-
// } else if (pProp === "click") {
|
|
263
|
-
// // console.log("mark12", arguments);
|
|
264
|
-
// // return Reflect.get(target, prop, receiver);
|
|
265
|
-
// // return pTarget[pProp].bind(pTarget);
|
|
266
|
-
// // return target[pProp];
|
|
267
|
-
// return (selector, options) => {
|
|
268
|
-
// pTarget[pProp](selector, options);
|
|
269
|
-
// };
|
|
270
|
-
// } else if (pProp === "$eval") {
|
|
271
|
-
// // return pTarget[pProp].bind(pTarget);
|
|
272
|
-
// return (selector, options) => {
|
|
273
|
-
// pTarget[pProp](selector, options);
|
|
274
|
-
// };
|
|
275
|
-
// } else if (pProp === "$") {
|
|
276
|
-
// return Reflect.get(...arguments);
|
|
277
|
-
// // return Reflect.get(target, prop, receiver);
|
|
278
|
-
// // return pTarget[pProp].bind(pTarget);
|
|
279
|
-
// // return target[pProp];
|
|
280
|
-
// // return pTarget[pProp].bind(pTarget);
|
|
281
|
-
// // return async (s) => {
|
|
282
|
-
// // console.log("mark17", s);
|
|
283
|
-
// // console.log("pTarget", pTarget);
|
|
284
|
-
// // console.log("pProp", pProp);
|
|
285
|
-
// // console.log("pReciever", pReciever);
|
|
286
|
-
// // // return "XXX";
|
|
287
|
-
// // // debugger;
|
|
288
|
-
// // return await pTarget[pProp](s);
|
|
289
|
-
// // };
|
|
290
|
-
// } else {
|
|
291
|
-
// return Reflect.get(...arguments);
|
|
292
|
-
// }
|
|
293
|
-
// },
|
|
294
|
-
// });
|
|
295
|
-
// });
|
|
296
|
-
// });
|
|
297
|
-
// // return (await target.pages()).map((page) => {
|
|
298
|
-
// // return new Proxy(page, handler2);
|
|
299
|
-
// // });
|
|
300
|
-
// };
|
|
301
|
-
// }
|
|
302
|
-
// },
|
|
303
|
-
// });
|
|
304
|
-
// }
|
|
305
|
-
///////////////////////
|
|
232
|
+
/* @ts-ignore:next-line */
|
|
306
233
|
return Reflect.get(...arguments);
|
|
307
234
|
},
|
|
308
235
|
});
|
|
@@ -341,11 +268,12 @@ export class BaseThen {
|
|
|
341
268
|
const butThenProxy = new Proxy(pm, {
|
|
342
269
|
get(target, prop, receiver) {
|
|
343
270
|
if (prop === "customScreenShot") {
|
|
344
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }));
|
|
271
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `${filepath}/${opts.path}` }), p);
|
|
345
272
|
}
|
|
346
273
|
if (prop === "writeFileSync") {
|
|
347
274
|
return (fp, contents) => target[prop](`${filepath}/${fp}`, contents);
|
|
348
275
|
}
|
|
276
|
+
/* @ts-ignore:next-line */
|
|
349
277
|
return Reflect.get(...arguments);
|
|
350
278
|
},
|
|
351
279
|
});
|
|
@@ -374,7 +302,7 @@ export class BaseCheck {
|
|
|
374
302
|
}
|
|
375
303
|
async check(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm) {
|
|
376
304
|
tLog(`\n Check: ${this.name}`);
|
|
377
|
-
const store = await this.checkThat(subject, testResourceConfiguration, artifactory);
|
|
305
|
+
const store = await this.checkThat(subject, testResourceConfiguration, artifactory, pm);
|
|
378
306
|
await this.checkCB(Object.entries(this.whens).reduce((a, [key, when]) => {
|
|
379
307
|
a[key] = async (payload) => {
|
|
380
308
|
return await when(payload, testResourceConfiguration).test(store, testResourceConfiguration, tLog, pm, "x");
|
|
@@ -39,17 +39,30 @@ export class BaseBuilder {
|
|
|
39
39
|
const numberOfFailures = Object.keys(suiteDone.givens).filter((k) => {
|
|
40
40
|
return suiteDone.givens[k].error;
|
|
41
41
|
}).length;
|
|
42
|
-
puppetMaster.writeFileSync(`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
puppetMaster.writeFileSync(`bdd_errors.txt`, numberOfFailures.toString());
|
|
43
|
+
const o = this.toObj();
|
|
44
|
+
puppetMaster.writeFileSync(`littleBoard.html`, `
|
|
45
|
+
<!DOCTYPE html>
|
|
46
|
+
<html lang="en">
|
|
47
|
+
|
|
48
|
+
<head>
|
|
49
|
+
<meta name="description" content="Webpage description goes here" />
|
|
50
|
+
<meta charset="utf-8" />
|
|
51
|
+
<title>kokomoBay - testeranto</title>
|
|
52
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
53
|
+
<meta name="author" content="" />
|
|
54
|
+
|
|
55
|
+
<link rel="stylesheet" href="/kokomoBay/docs/TestReport.css" />
|
|
56
|
+
<script src="/kokomoBay/docs/TestReport.js"></script>
|
|
57
|
+
|
|
58
|
+
</head>
|
|
59
|
+
|
|
60
|
+
<body>
|
|
61
|
+
<h1>Test report</h1>
|
|
62
|
+
<div id="root"/>
|
|
63
|
+
</body>
|
|
64
|
+
`);
|
|
51
65
|
puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
|
|
52
|
-
// console.log(`exiting gracefully with ${numberOfFailures} failures.`);
|
|
53
66
|
return {
|
|
54
67
|
failed: numberOfFailures,
|
|
55
68
|
artifacts: this.artifacts || [],
|
|
@@ -31,8 +31,6 @@ export class ClassBuilder extends BaseBuilder {
|
|
|
31
31
|
};
|
|
32
32
|
return a;
|
|
33
33
|
}, {});
|
|
34
|
-
super(input, classySuites, classyGivens, classyWhens, classyThens, classyChecks, testResourceRequirement, testSpecification
|
|
35
|
-
// puppetMaster
|
|
36
|
-
);
|
|
34
|
+
super(input, classySuites, classyGivens, classyWhens, classyThens, classyChecks, testResourceRequirement, testSpecification);
|
|
37
35
|
}
|
|
38
36
|
}
|
|
@@ -6,16 +6,22 @@ export default class Testeranto extends ClassBuilder {
|
|
|
6
6
|
const fullTestInterface = DefaultTestInterface(testInterface);
|
|
7
7
|
super(testImplementation, testSpecification, input, class extends BaseSuite {
|
|
8
8
|
afterAll(store, artifactory, pm) {
|
|
9
|
-
return fullTestInterface.afterAll(store,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
return fullTestInterface.afterAll(store,
|
|
10
|
+
// (fPath: string, value: unknown) =>
|
|
11
|
+
// // TODO does not work?
|
|
12
|
+
// {
|
|
13
|
+
// artifactory(`afterAll4-${this.name}/${fPath}`, value);
|
|
14
|
+
// },
|
|
15
|
+
pm);
|
|
12
16
|
}
|
|
13
17
|
assertThat(t) {
|
|
14
18
|
fullTestInterface.assertThis(t);
|
|
15
19
|
}
|
|
16
20
|
async setup(s, artifactory, tr, pm) {
|
|
17
21
|
return (fullTestInterface.beforeAll ||
|
|
18
|
-
(async (input, artifactory, tr, pm) => input))(s, this.testResourceConfiguration,
|
|
22
|
+
(async (input, artifactory, tr, pm) => input))(s, this.testResourceConfiguration,
|
|
23
|
+
// artifactory,
|
|
24
|
+
pm);
|
|
19
25
|
}
|
|
20
26
|
}, class Given extends BaseGiven {
|
|
21
27
|
constructor() {
|
|
@@ -23,10 +29,15 @@ export default class Testeranto extends ClassBuilder {
|
|
|
23
29
|
this.uberCatcher = uberCatcher;
|
|
24
30
|
}
|
|
25
31
|
async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
|
|
26
|
-
return fullTestInterface.beforeEach(subject, initializer,
|
|
32
|
+
return fullTestInterface.beforeEach(subject, initializer,
|
|
33
|
+
// artifactory,
|
|
34
|
+
testResource, initialValues, pm);
|
|
27
35
|
}
|
|
28
36
|
afterEach(store, key, artifactory, pm) {
|
|
29
|
-
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
37
|
+
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
38
|
+
// (fPath: string, value: unknown) =>
|
|
39
|
+
// artifactory(`after/${fPath}`, value),
|
|
40
|
+
pm)));
|
|
30
41
|
}
|
|
31
42
|
}, class When extends BaseWhen {
|
|
32
43
|
async andWhen(store, whenCB, testResource, pm) {
|
|
@@ -86,12 +97,17 @@ export default class Testeranto extends ClassBuilder {
|
|
|
86
97
|
this.initialValues = initialValues;
|
|
87
98
|
}
|
|
88
99
|
async checkThat(subject, testResourceConfiguration, artifactory, pm) {
|
|
89
|
-
return fullTestInterface.beforeEach(subject, this.initialValues,
|
|
100
|
+
return fullTestInterface.beforeEach(subject, this.initialValues,
|
|
101
|
+
// (fPath: string, value: unknown) =>
|
|
102
|
+
// artifactory(`before/${fPath}`, value),
|
|
103
|
+
testResourceConfiguration, this.initialValues, pm);
|
|
90
104
|
}
|
|
91
105
|
afterEach(store, key, artifactory, pm) {
|
|
92
|
-
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
93
|
-
//
|
|
94
|
-
|
|
106
|
+
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
107
|
+
// (fPath: string, value: unknown) =>
|
|
108
|
+
// // TODO does not work?
|
|
109
|
+
// artifactory(`afterEach2-${this.name}/${fPath}`, value),
|
|
110
|
+
pm)));
|
|
95
111
|
}
|
|
96
112
|
}, testResourceRequirement);
|
|
97
113
|
}
|