testeranto 0.121.1 → 0.125.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 +97001 -0
- package/.aider.conf.yml +5 -0
- package/.aider.input.history +9 -0
- package/.aider.tags.cache.v3/b7/e6/5be87b62aeaf2bc244ff41c1b61a.val +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/e3/e6/3501625caf5d5eb171f0d248462e.val +0 -0
- package/.aider.tags.cache.v3/ec/c0/161c249c35be853cc40cf11f9267.val +0 -0
- package/README.md +9 -0
- package/dist/common/{Init.js → src/Init.js} +1 -32
- package/dist/common/src/Node.js +49 -0
- package/dist/common/src/PM/base.js +230 -0
- package/dist/common/{PM → src/PM}/main.js +300 -233
- package/dist/common/src/PM/node.js +161 -0
- package/dist/common/{PM/node.js → src/PM/pure.js} +27 -18
- package/dist/common/{PM → src/PM}/web.js +14 -47
- package/dist/common/{Node.js → src/Pure.js} +11 -9
- package/dist/common/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +5 -4
- package/dist/common/src/SubPackages/react/component/node.js +10 -0
- package/dist/common/src/SubPackages/react/component/pure.js +10 -0
- package/dist/common/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +2 -2
- package/dist/common/src/SubPackages/react/jsx/index.js +64 -0
- package/dist/common/src/SubPackages/react/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +8 -14
- package/dist/common/src/SubPackages/react-dom/component/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/static.js +26 -0
- package/dist/common/src/SubPackages/react-dom/component/web.js +16 -0
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +31 -0
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +59 -0
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +16 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +15 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +8 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +57 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +10 -0
- package/dist/common/{Web.js → src/Web.js} +1 -4
- package/dist/common/{build.js → src/build.js} +37 -57
- package/dist/common/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/common/src/esbuildConfigs/pure.js +41 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/common/src/examples/react/component/index.js +33 -0
- package/dist/common/src/examples/react/component/test.js +36 -0
- package/dist/common/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/common/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/common/{lib → src/lib}/core.js +5 -43
- package/dist/common/{lib → src/lib}/index.js +1 -1
- package/dist/common/{run.js → src/run.js} +5 -5
- package/dist/common/{utils.js → src/utils.js} +35 -1
- package/dist/common/testeranto.config.js +41 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/{Init.js → src/Init.js} +1 -32
- package/dist/module/src/Node.js +42 -0
- package/dist/module/src/PM/base.js +223 -0
- package/dist/module/{PM → src/PM}/main.js +301 -234
- package/dist/module/src/PM/node.js +154 -0
- package/dist/module/{PM/node.js → src/PM/pure.js} +25 -16
- package/dist/module/{PM → src/PM}/web.js +14 -47
- package/dist/module/{Project.js → src/Project.js} +6 -3
- package/dist/module/{Node.js → src/Pure.js} +9 -7
- package/dist/module/{ReportClient.js → src/ReportClient.js} +1 -1
- package/dist/module/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +3 -4
- package/dist/module/src/SubPackages/react/component/node.js +5 -0
- package/dist/module/src/SubPackages/react/component/pure.js +5 -0
- package/dist/module/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +3 -3
- package/dist/module/src/SubPackages/react/jsx/index.js +58 -0
- package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +5 -13
- package/dist/module/src/SubPackages/react-dom/component/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/static.js +22 -0
- package/dist/module/src/SubPackages/react-dom/component/web.js +11 -0
- package/dist/module/{SubPackages/react-dom/jsx/node.js → src/SubPackages/react-dom/jsx/dynamic.js} +3 -7
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +53 -0
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +11 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +14 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +3 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +54 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +5 -0
- package/dist/module/{TestReport.js → src/TestReport.js} +19 -16
- package/dist/module/{Web.js → src/Web.js} +1 -4
- package/dist/module/{build.js → src/build.js} +37 -57
- package/dist/module/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/module/src/esbuildConfigs/pure.js +36 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/module/src/examples/react/component/index.js +26 -0
- package/dist/module/src/examples/react/component/test.js +32 -0
- package/dist/module/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/module/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/module/{lib → src/lib}/core.js +5 -43
- package/dist/module/{lib → src/lib}/index.js +1 -1
- package/dist/module/{run.js → src/run.js} +5 -5
- package/dist/module/src/utils.js +53 -0
- package/dist/module/testeranto.config.js +39 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +5 -2
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +4 -1
- package/dist/prebuild/build.mjs +115 -65
- package/dist/prebuild/init-docs.mjs +1 -0
- package/dist/prebuild/run.mjs +418 -382
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Node.d.ts +9 -0
- package/dist/types/src/PM/base.d.ts +34 -0
- package/dist/types/{PM → src/PM}/index.d.ts +21 -22
- package/dist/types/{PM → src/PM}/main.d.ts +15 -10
- package/dist/types/src/PM/node.d.ts +38 -0
- package/dist/types/{PM/node.d.ts → src/PM/pure.d.ts} +16 -17
- package/dist/types/{PM → src/PM}/web.d.ts +10 -15
- package/dist/types/src/Pure.d.ts +9 -0
- package/dist/types/src/SubPackages/react/component/index.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +20 -0
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +9 -0
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +4 -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/src/SubPackages/react-test-renderer/jsx/index.d.ts +11 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +1 -1
- package/dist/types/src/Types.d.ts +88 -0
- package/dist/types/src/Web.d.ts +9 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +2 -1
- package/dist/types/src/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/pure.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/src/examples/react/component/index.d.ts +13 -0
- package/dist/types/src/examples/react/component/test.d.ts +17 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +35 -30
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +7 -8
- package/dist/types/src/lib/classBuilder.d.ts +9 -0
- package/dist/types/src/lib/core.d.ts +7 -0
- package/dist/types/{lib → src/lib}/index.d.ts +14 -36
- package/dist/types/src/lib/types.d.ts +15 -0
- package/dist/types/src/utils.d.ts +18 -0
- package/dist/types/testeranto.config.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/eslint.config.mjs +111 -0
- package/package.json +28 -8
- package/src/Init.ts +1 -39
- package/src/Node.ts +42 -46
- package/src/PM/base.ts +179 -181
- package/src/PM/index.ts +28 -21
- package/src/PM/main.ts +359 -318
- package/src/PM/node.ts +88 -44
- package/src/PM/pure.ts +209 -0
- package/src/PM/web.ts +19 -121
- package/src/Project.tsx +8 -5
- package/src/Pure.ts +69 -0
- package/src/ReportClient.tsx +8 -3
- package/src/SubPackages/react/component/index.ts +28 -0
- package/src/SubPackages/react/component/node.ts +12 -82
- package/src/SubPackages/react/component/pure.ts +17 -0
- package/src/SubPackages/react/component/web.ts +12 -81
- package/src/SubPackages/react/jsx/index.ts +56 -52
- package/src/SubPackages/react/jsx/node.ts +12 -29
- package/src/SubPackages/react/jsx/pure.ts +23 -0
- package/src/SubPackages/react/jsx/web.ts +17 -36
- package/src/SubPackages/react-dom/component/dynamic.ts +107 -0
- package/src/SubPackages/react-dom/component/node.ts +11 -116
- package/src/SubPackages/react-dom/component/pure.ts +17 -0
- package/src/SubPackages/react-dom/component/static.ts +41 -0
- package/src/SubPackages/react-dom/component/web.ts +7 -113
- package/src/SubPackages/react-dom/jsx/dynamic.ts +46 -0
- package/src/SubPackages/react-dom/jsx/node.ts +10 -58
- package/src/SubPackages/react-dom/jsx/pure.ts +18 -0
- package/src/SubPackages/react-dom/jsx/static.ts +87 -0
- package/src/SubPackages/react-dom/jsx/web.ts +7 -135
- package/src/SubPackages/react-test-renderer/component/index.ts +27 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +7 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +7 -25
- package/src/SubPackages/react-test-renderer/component/pure.ts +18 -0
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +63 -0
- package/src/SubPackages/react-test-renderer/component/test/node.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/web.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +7 -23
- package/src/SubPackages/react-test-renderer/jsx/index.ts +13 -46
- package/src/SubPackages/react-test-renderer/jsx/node.ts +9 -15
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +31 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +9 -14
- package/src/TestReport.tsx +7 -4
- package/src/Types.ts +114 -140
- package/src/Web.ts +13 -48
- package/src/build.ts +52 -78
- package/src/defaultConfig.ts +3 -5
- package/src/esbuildConfigs/index.ts +2 -2
- package/src/esbuildConfigs/inputFilesPlugin.ts +2 -1
- package/src/esbuildConfigs/node.ts +7 -5
- package/src/esbuildConfigs/pure.ts +72 -0
- package/src/esbuildConfigs/web.ts +8 -5
- package/src/examples/react/component/index.tsx +35 -0
- package/src/examples/react/component/test.ts +83 -0
- package/src/lib/abstractBase.ts +100 -192
- package/src/lib/basebuilder.ts +40 -40
- package/src/lib/classBuilder.ts +18 -26
- package/src/lib/core.ts +22 -77
- package/src/lib/index.ts +31 -66
- package/src/lib/types.ts +20 -90
- package/src/run.ts +3 -6
- package/src/utils.ts +50 -5
- package/testeranto/Project.css +11367 -0
- package/testeranto/Project.js +24643 -0
- package/testeranto/ReportClient.css +11367 -0
- package/testeranto/ReportClient.js +24641 -0
- package/testeranto/TestReport.css +11367 -0
- package/testeranto/TestReport.js +27485 -0
- package/testeranto/bundles/node/react/metafile.json +627 -0
- package/testeranto/bundles/node/react/src/SubPackages/react-test-renderer/component/test/node.mjs +24687 -0
- package/testeranto/bundles/pure/react/metafile.json +8 -0
- package/testeranto/bundles/pure/react/src/SubPackages/react-test-renderer/component/test/pure.mjs +24625 -0
- package/testeranto/bundles/web/react/metafile.json +8 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.html +19 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.mjs +21290 -0
- package/testeranto/index.html +28 -0
- package/testeranto/reports/react/config.json +22 -0
- package/testeranto/reports/react/index.html +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/node/node/console_log.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/featurePrompt.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/lint_errors.json +3381 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/prompt.txt +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/type_errors.txt +17 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/console_log.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/lint_errors.json +2947 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/prompt.txt +23 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/type_errors.txt +18 -0
- package/testeranto/reports/react/summary.json +8 -0
- package/testeranto.config.ts +45 -0
- package/tsc.log +52 -64
- package/type-fix.txt +2 -0
- package/dist/common/PM/base.js +0 -233
- package/dist/common/SubPackages/react/component/node.js +0 -19
- package/dist/common/SubPackages/react/jsx/index.js +0 -21
- package/dist/common/SubPackages/react-dom/component/node.js +0 -88
- package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
- package/dist/module/PM/base.js +0 -226
- package/dist/module/SubPackages/react/component/node.js +0 -14
- package/dist/module/SubPackages/react/jsx/index.js +0 -15
- package/dist/module/SubPackages/react-dom/component/node.js +0 -80
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/utils.js +0 -20
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/base.d.ts +0 -38
- package/dist/types/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
- package/dist/types/Types.d.ts +0 -61
- package/dist/types/Web.d.ts +0 -9
- package/dist/types/defaultConfig.d.ts +0 -3
- package/dist/types/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/lib/classBuilder.d.ts +0 -7
- package/dist/types/lib/core.d.ts +0 -7
- package/dist/types/lib/types.d.ts +0 -11
- package/dist/types/utils.d.ts +0 -12
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.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/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/common/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Footer.js → src/Footer.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.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/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/module/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{ReportServer.d.ts → src/ReportServer.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-promised/index.d.ts +0 -0
- /package/dist/types/{build.d.ts → src/build.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{init-docs.d.ts → src/init-docs.d.ts} +0 -0
- /package/dist/types/{run.d.ts → src/run.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/src/lib/classBuilder.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Ibdd_in,
|
|
3
|
-
Ibdd_out,
|
|
4
|
-
ITestImplementation,
|
|
5
|
-
ITestSpecification,
|
|
6
|
-
} from "../Types.js";
|
|
1
|
+
import { IT, ITestImplementation, ITestSpecification, OT } from "../Types.js";
|
|
7
2
|
|
|
8
3
|
import { BaseBuilder } from "./basebuilder.js";
|
|
9
4
|
import {
|
|
@@ -16,33 +11,30 @@ import {
|
|
|
16
11
|
import { ITTestResourceRequest } from "./index.js";
|
|
17
12
|
import { BaseCheck } from "./abstractBase.js";
|
|
18
13
|
|
|
14
|
+
type IExtenstions = Record<string, unknown>;
|
|
15
|
+
|
|
19
16
|
export abstract class ClassBuilder<
|
|
20
|
-
I extends
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Record<string, any>,
|
|
33
|
-
Record<string, any>,
|
|
34
|
-
Record<string, any>
|
|
35
|
-
>
|
|
36
|
-
> extends BaseBuilder<I, O, any, any, any, any, any> {
|
|
17
|
+
I extends IT = IT,
|
|
18
|
+
O extends OT = OT,
|
|
19
|
+
M = unknown
|
|
20
|
+
> extends BaseBuilder<
|
|
21
|
+
I,
|
|
22
|
+
O,
|
|
23
|
+
IExtenstions,
|
|
24
|
+
IExtenstions,
|
|
25
|
+
IExtenstions,
|
|
26
|
+
IExtenstions,
|
|
27
|
+
IExtenstions
|
|
28
|
+
> {
|
|
37
29
|
constructor(
|
|
38
|
-
testImplementation: ITestImplementation<I, O>,
|
|
30
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
39
31
|
testSpecification: ITestSpecification<I, O>,
|
|
40
32
|
input: I["iinput"],
|
|
41
33
|
suiteKlasser: ISuiteKlasser<I, O>,
|
|
42
34
|
givenKlasser: IGivenKlasser<I>,
|
|
43
35
|
whenKlasser: IWhenKlasser<I>,
|
|
44
36
|
thenKlasser: IThenKlasser<I>,
|
|
45
|
-
checkKlasser: ICheckKlasser<I
|
|
37
|
+
checkKlasser: ICheckKlasser<I>,
|
|
46
38
|
testResourceRequirement: ITTestResourceRequest
|
|
47
39
|
) {
|
|
48
40
|
const classySuites = Object.entries(testImplementation.suites).reduce(
|
|
@@ -116,7 +108,7 @@ export abstract class ClassBuilder<
|
|
|
116
108
|
};
|
|
117
109
|
return a;
|
|
118
110
|
},
|
|
119
|
-
{} as Record<string, (n, f, c) => BaseCheck<I
|
|
111
|
+
{} as Record<string, (n, f, c) => BaseCheck<I>>
|
|
120
112
|
);
|
|
121
113
|
|
|
122
114
|
super(
|
package/src/lib/core.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { IStore } from "../SubPackages/react/jsx";
|
|
2
1
|
import {
|
|
3
2
|
ITestSpecification,
|
|
4
3
|
ITestImplementation,
|
|
5
4
|
ITestInterface,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
IT,
|
|
6
|
+
OT,
|
|
8
7
|
} from "../Types.js";
|
|
9
|
-
import { PM } from "../PM/index";
|
|
10
8
|
|
|
11
9
|
import {
|
|
12
10
|
DefaultTestInterface,
|
|
@@ -23,32 +21,20 @@ import {
|
|
|
23
21
|
BaseCheck,
|
|
24
22
|
} from "./abstractBase.js";
|
|
25
23
|
import { ClassBuilder } from "./classBuilder.js";
|
|
24
|
+
import { IPM } from "./types";
|
|
26
25
|
|
|
27
26
|
export default abstract class Testeranto<
|
|
28
|
-
I extends
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
unknown,
|
|
33
|
-
unknown,
|
|
34
|
-
unknown,
|
|
35
|
-
unknown
|
|
36
|
-
>,
|
|
37
|
-
O extends Ibdd_out<
|
|
38
|
-
Record<string, any>,
|
|
39
|
-
Record<string, any>,
|
|
40
|
-
Record<string, any>,
|
|
41
|
-
Record<string, any>,
|
|
42
|
-
Record<string, any>
|
|
43
|
-
>
|
|
44
|
-
> extends ClassBuilder<I, O> {
|
|
27
|
+
I extends IT,
|
|
28
|
+
O extends OT,
|
|
29
|
+
M
|
|
30
|
+
> extends ClassBuilder<I, O, M> {
|
|
45
31
|
constructor(
|
|
46
32
|
input: I["iinput"],
|
|
47
33
|
testSpecification: ITestSpecification<I, O>,
|
|
48
|
-
testImplementation: ITestImplementation<I, O>,
|
|
34
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
49
35
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
|
|
50
36
|
testInterface: Partial<ITestInterface<I>>,
|
|
51
|
-
uberCatcher: (cb) => void
|
|
37
|
+
uberCatcher: (cb: () => void) => void
|
|
52
38
|
) {
|
|
53
39
|
const fullTestInterface = DefaultTestInterface(testInterface);
|
|
54
40
|
|
|
@@ -58,20 +44,12 @@ export default abstract class Testeranto<
|
|
|
58
44
|
input,
|
|
59
45
|
|
|
60
46
|
class extends BaseSuite<I, O> {
|
|
61
|
-
afterAll(store:
|
|
62
|
-
return fullTestInterface.afterAll(
|
|
63
|
-
store,
|
|
64
|
-
// (fPath: string, value: unknown) =>
|
|
65
|
-
// // TODO does not work?
|
|
66
|
-
// {
|
|
67
|
-
// artifactory(`afterAll4-${this.name}/${fPath}`, value);
|
|
68
|
-
// },
|
|
69
|
-
pm
|
|
70
|
-
);
|
|
47
|
+
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: IPM) {
|
|
48
|
+
return fullTestInterface.afterAll(store, pm);
|
|
71
49
|
}
|
|
72
50
|
|
|
73
|
-
assertThat(t) {
|
|
74
|
-
fullTestInterface.assertThis(t);
|
|
51
|
+
assertThat(t): boolean {
|
|
52
|
+
return fullTestInterface.assertThis(t);
|
|
75
53
|
}
|
|
76
54
|
|
|
77
55
|
async setup(
|
|
@@ -86,7 +64,7 @@ export default abstract class Testeranto<
|
|
|
86
64
|
input: I["iinput"],
|
|
87
65
|
artifactory: ITestArtifactory,
|
|
88
66
|
tr,
|
|
89
|
-
pm:
|
|
67
|
+
pm: IPM
|
|
90
68
|
) => input as any)
|
|
91
69
|
)(
|
|
92
70
|
s,
|
|
@@ -142,20 +120,6 @@ export default abstract class Testeranto<
|
|
|
142
120
|
} catch (e) {
|
|
143
121
|
throw e;
|
|
144
122
|
}
|
|
145
|
-
// return fullTestInterface
|
|
146
|
-
// .andWhen(store, whenCB, testResource, pm)
|
|
147
|
-
// .catch((e) => {
|
|
148
|
-
// throw e;
|
|
149
|
-
// });
|
|
150
|
-
// return new Promise((res, rej) => {
|
|
151
|
-
// fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
152
|
-
// });
|
|
153
|
-
// return await fullTestInterface.andWhen(
|
|
154
|
-
// store,
|
|
155
|
-
// whenCB,
|
|
156
|
-
// testResource,
|
|
157
|
-
// pm
|
|
158
|
-
// );
|
|
159
123
|
}
|
|
160
124
|
} as any,
|
|
161
125
|
|
|
@@ -164,7 +128,7 @@ export default abstract class Testeranto<
|
|
|
164
128
|
store: any,
|
|
165
129
|
thenCB,
|
|
166
130
|
testResource: any,
|
|
167
|
-
pm:
|
|
131
|
+
pm: IPM
|
|
168
132
|
): Promise<I["iselection"]> {
|
|
169
133
|
return await fullTestInterface
|
|
170
134
|
.butThen(store, thenCB, testResource, pm)
|
|
@@ -177,41 +141,22 @@ export default abstract class Testeranto<
|
|
|
177
141
|
throw e;
|
|
178
142
|
}
|
|
179
143
|
);
|
|
180
|
-
// try {
|
|
181
|
-
// console.log("mark 4");
|
|
182
|
-
// return await fullTestInterface.butThen(
|
|
183
|
-
// store,
|
|
184
|
-
// thenCB,
|
|
185
|
-
// testResource,
|
|
186
|
-
// pm
|
|
187
|
-
// );
|
|
188
|
-
// } catch (e) {
|
|
189
|
-
// console.log("mar123");
|
|
190
|
-
// throw e;
|
|
191
|
-
// }
|
|
192
|
-
|
|
193
|
-
// return await fullTestInterface.butThen(
|
|
194
|
-
// store,
|
|
195
|
-
// thenCB,
|
|
196
|
-
// testResourceConfiguration,
|
|
197
|
-
// pm
|
|
198
|
-
// );
|
|
199
144
|
}
|
|
200
145
|
} as any,
|
|
201
146
|
|
|
202
|
-
class Check extends BaseCheck<I
|
|
147
|
+
class Check extends BaseCheck<I> {
|
|
203
148
|
initialValues: any;
|
|
204
149
|
|
|
205
150
|
constructor(
|
|
206
151
|
name: string,
|
|
207
152
|
features: string[],
|
|
208
|
-
checkCallback: (s: I["istore"], pm:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
153
|
+
checkCallback: (s: I["istore"], pm: IPM) => any,
|
|
154
|
+
x,
|
|
155
|
+
i,
|
|
156
|
+
c
|
|
212
157
|
) {
|
|
213
|
-
super(name, features,
|
|
214
|
-
this.initialValues =
|
|
158
|
+
super(name, features, checkCallback, x, c);
|
|
159
|
+
this.initialValues = i;
|
|
215
160
|
}
|
|
216
161
|
|
|
217
162
|
async checkThat(
|
package/src/lib/index.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PM_Pure } from "../PM/pure.js";
|
|
2
|
+
|
|
3
|
+
import { PM_Node } from "../PM/node.js";
|
|
4
|
+
import { PM_Web } from "../PM/web.js";
|
|
5
|
+
import {
|
|
6
|
+
Ibdd_in,
|
|
7
|
+
Ibdd_out,
|
|
8
|
+
ITestInterface,
|
|
9
|
+
ITestconfig,
|
|
10
|
+
IBuiltConfig,
|
|
11
|
+
IRunTime,
|
|
12
|
+
ITestTypes,
|
|
13
|
+
IT,
|
|
14
|
+
OT,
|
|
15
|
+
} from "../Types.js";
|
|
3
16
|
|
|
4
17
|
import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
|
|
18
|
+
import { IPM } from "./types.js";
|
|
5
19
|
|
|
6
20
|
export const BaseTestInterface: ITestInterface<
|
|
7
21
|
Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>
|
|
@@ -12,7 +26,7 @@ export const BaseTestInterface: ITestInterface<
|
|
|
12
26
|
initialValues: any,
|
|
13
27
|
x: any,
|
|
14
28
|
testResource: any,
|
|
15
|
-
pm:
|
|
29
|
+
pm: IPM
|
|
16
30
|
) {
|
|
17
31
|
return subject as any;
|
|
18
32
|
},
|
|
@@ -44,7 +58,7 @@ export const BaseTestInterface: ITestInterface<
|
|
|
44
58
|
thenCb(store);
|
|
45
59
|
} catch (e) {}
|
|
46
60
|
},
|
|
47
|
-
andWhen: (a) => a,
|
|
61
|
+
andWhen: async (a) => a,
|
|
48
62
|
assertThis: () => null,
|
|
49
63
|
};
|
|
50
64
|
|
|
@@ -94,44 +108,19 @@ type ITest = {
|
|
|
94
108
|
givens: IGivens<
|
|
95
109
|
Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>
|
|
96
110
|
>;
|
|
97
|
-
checks: BaseCheck<
|
|
98
|
-
Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>,
|
|
99
|
-
Ibdd_out<
|
|
100
|
-
Record<string, any>,
|
|
101
|
-
Record<string, any>,
|
|
102
|
-
Record<string, any>,
|
|
103
|
-
Record<string, any>,
|
|
104
|
-
Record<string, any>
|
|
105
|
-
>
|
|
106
|
-
>[];
|
|
111
|
+
checks: BaseCheck<IT>[];
|
|
107
112
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
108
113
|
};
|
|
109
114
|
|
|
110
|
-
export type ITestJob
|
|
115
|
+
export type ITestJob = {
|
|
111
116
|
toObj(): object;
|
|
112
117
|
test: ITest;
|
|
113
118
|
runner: (
|
|
114
119
|
x: ITTestResourceConfiguration,
|
|
115
120
|
t: ITLog
|
|
116
|
-
) => Promise<
|
|
117
|
-
BaseSuite<
|
|
118
|
-
Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>,
|
|
119
|
-
Ibdd_out<
|
|
120
|
-
Record<string, any>,
|
|
121
|
-
Record<string, any>,
|
|
122
|
-
Record<string, any>,
|
|
123
|
-
Record<string, any>,
|
|
124
|
-
Record<string, any>
|
|
125
|
-
>
|
|
126
|
-
>
|
|
127
|
-
>;
|
|
121
|
+
) => Promise<BaseSuite<IT, OT>>;
|
|
128
122
|
testResourceRequirement: ITTestResourceRequirement;
|
|
129
|
-
receiveTestResourceConfig: (pm:
|
|
130
|
-
failed: number;
|
|
131
|
-
artifacts: Promise<unknown>[];
|
|
132
|
-
logPromise: Promise<unknown>;
|
|
133
|
-
features: string[];
|
|
134
|
-
}>;
|
|
123
|
+
receiveTestResourceConfig: (pm: PM_Node | PM_Web | PM_Pure) => IFinalResults;
|
|
135
124
|
};
|
|
136
125
|
|
|
137
126
|
export type ITestResults = Promise<{ test: ITest }>[];
|
|
@@ -142,42 +131,18 @@ export const defaultTestResourceRequirement: ITTestResourceRequest = {
|
|
|
142
131
|
|
|
143
132
|
export type ITestArtifactory = (key: string, value: unknown) => unknown;
|
|
144
133
|
|
|
134
|
+
export type { ITestconfig, IBuiltConfig, IRunTime, ITestTypes };
|
|
135
|
+
|
|
145
136
|
export type IRunnables = {
|
|
146
137
|
nodeEntryPoints: Record<string, string>;
|
|
147
138
|
webEntryPoints: Record<string, string>;
|
|
139
|
+
importEntryPoints: Record<string, string>;
|
|
148
140
|
};
|
|
149
141
|
|
|
150
|
-
export type IFinalResults = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export type IPluginFactory = (
|
|
157
|
-
register: (entrypoint, sources) => any,
|
|
158
|
-
entrypoints
|
|
159
|
-
) => Plugin;
|
|
160
|
-
|
|
161
|
-
export type IBaseConfig = {
|
|
162
|
-
src: string;
|
|
163
|
-
clearScreen: boolean;
|
|
164
|
-
debugger: boolean;
|
|
165
|
-
// devMode: boolean;
|
|
166
|
-
externals: string[];
|
|
167
|
-
minify: boolean;
|
|
168
|
-
// outbase: string;
|
|
169
|
-
// outdir: string;
|
|
170
|
-
ports: string[];
|
|
171
|
-
tests: ITestTypes[];
|
|
172
|
-
|
|
173
|
-
nodePlugins: IPluginFactory[];
|
|
174
|
-
webPlugins: IPluginFactory[];
|
|
175
|
-
|
|
176
|
-
featureIngestor: (s: string) => Promise<string>;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export type IBuiltConfig = { buildDir: string } & IBaseConfig;
|
|
180
|
-
|
|
181
|
-
export type IConfigV2 = {
|
|
182
|
-
projects: Record<string, IBaseConfig>;
|
|
142
|
+
export type IFinalResults = {
|
|
143
|
+
features: string[];
|
|
144
|
+
failed: boolean;
|
|
145
|
+
fails: number;
|
|
146
|
+
artifacts: Promise<unknown>[];
|
|
147
|
+
logPromise: Promise<unknown>;
|
|
183
148
|
};
|
package/src/lib/types.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PM } from "../PM";
|
|
2
|
-
import {
|
|
2
|
+
import { PM_Node } from "../PM/node";
|
|
3
|
+
import { PM_Pure } from "../PM/pure";
|
|
4
|
+
import { PM_Web } from "../PM/web";
|
|
5
|
+
import { IT, OT } from "../Types";
|
|
3
6
|
|
|
4
7
|
import {
|
|
5
8
|
IGivens,
|
|
@@ -10,108 +13,35 @@ import {
|
|
|
10
13
|
BaseThen,
|
|
11
14
|
} from "./abstractBase";
|
|
12
15
|
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
unknown,
|
|
17
|
-
unknown,
|
|
18
|
-
unknown,
|
|
19
|
-
unknown,
|
|
20
|
-
unknown,
|
|
21
|
-
unknown
|
|
22
|
-
>,
|
|
23
|
-
O extends Ibdd_out<
|
|
24
|
-
Record<string, any>,
|
|
25
|
-
Record<string, any>,
|
|
26
|
-
Record<string, any>,
|
|
27
|
-
Record<string, any>,
|
|
28
|
-
Record<string, any>
|
|
29
|
-
>
|
|
30
|
-
> = {
|
|
16
|
+
export type IPM = PM_Node | PM_Web | PM_Pure;
|
|
17
|
+
|
|
18
|
+
export type ITestCheckCallback<I extends IT, O extends OT> = {
|
|
31
19
|
[K in keyof O["checks"]]: (
|
|
32
20
|
name: string,
|
|
33
21
|
features: string[],
|
|
34
22
|
checkCallback: (store: I["istore"], pm: PM) => Promise<any>,
|
|
35
23
|
|
|
36
24
|
...xtrasA: O["checks"][K]
|
|
37
|
-
) => BaseCheck<I
|
|
25
|
+
) => BaseCheck<I>;
|
|
38
26
|
};
|
|
39
27
|
|
|
40
|
-
export type ISuiteKlasser<
|
|
41
|
-
I extends Ibdd_in<
|
|
42
|
-
unknown,
|
|
43
|
-
unknown,
|
|
44
|
-
unknown,
|
|
45
|
-
unknown,
|
|
46
|
-
unknown,
|
|
47
|
-
unknown,
|
|
48
|
-
unknown
|
|
49
|
-
>,
|
|
50
|
-
O extends Ibdd_out<
|
|
51
|
-
Record<string, any>,
|
|
52
|
-
Record<string, any>,
|
|
53
|
-
Record<string, any>,
|
|
54
|
-
Record<string, any>,
|
|
55
|
-
Record<string, any>
|
|
56
|
-
>
|
|
57
|
-
> = (
|
|
28
|
+
export type ISuiteKlasser<I extends IT, O extends OT> = (
|
|
58
29
|
name: string,
|
|
59
30
|
index: number,
|
|
60
31
|
givens: IGivens<I>,
|
|
61
|
-
checks: BaseCheck<I
|
|
32
|
+
checks: BaseCheck<I>[]
|
|
62
33
|
) => BaseSuite<I, O>;
|
|
63
34
|
|
|
64
|
-
export type IGivenKlasser<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
unknown,
|
|
72
|
-
unknown
|
|
73
|
-
>
|
|
74
|
-
> = (name, features, whens, thens, givenCB) => BaseGiven<I>;
|
|
35
|
+
export type IGivenKlasser<I extends IT> = (
|
|
36
|
+
name,
|
|
37
|
+
features,
|
|
38
|
+
whens,
|
|
39
|
+
thens,
|
|
40
|
+
givenCB
|
|
41
|
+
) => BaseGiven<I>;
|
|
75
42
|
|
|
76
|
-
export type IWhenKlasser<
|
|
77
|
-
I extends Ibdd_in<
|
|
78
|
-
unknown,
|
|
79
|
-
unknown,
|
|
80
|
-
unknown,
|
|
81
|
-
unknown,
|
|
82
|
-
unknown,
|
|
83
|
-
unknown,
|
|
84
|
-
unknown
|
|
85
|
-
>
|
|
86
|
-
> = (s, o) => BaseWhen<I>;
|
|
43
|
+
export type IWhenKlasser<I extends IT> = (s, o) => BaseWhen<I>;
|
|
87
44
|
|
|
88
|
-
export type IThenKlasser<
|
|
89
|
-
I extends Ibdd_in<
|
|
90
|
-
unknown,
|
|
91
|
-
unknown,
|
|
92
|
-
unknown,
|
|
93
|
-
unknown,
|
|
94
|
-
unknown,
|
|
95
|
-
unknown,
|
|
96
|
-
unknown
|
|
97
|
-
>
|
|
98
|
-
> = (s, o) => BaseThen<I>;
|
|
45
|
+
export type IThenKlasser<I extends IT> = (s, o) => BaseThen<I>;
|
|
99
46
|
|
|
100
|
-
export type ICheckKlasser<
|
|
101
|
-
I extends Ibdd_in<
|
|
102
|
-
unknown,
|
|
103
|
-
unknown,
|
|
104
|
-
unknown,
|
|
105
|
-
unknown,
|
|
106
|
-
unknown,
|
|
107
|
-
unknown,
|
|
108
|
-
unknown
|
|
109
|
-
>,
|
|
110
|
-
O extends Ibdd_out<
|
|
111
|
-
Record<string, any>,
|
|
112
|
-
Record<string, any>,
|
|
113
|
-
Record<string, any>,
|
|
114
|
-
Record<string, any>,
|
|
115
|
-
Record<string, any>
|
|
116
|
-
>
|
|
117
|
-
> = (n, f, cb, w, t) => BaseCheck<I, O>;
|
|
47
|
+
export type ICheckKlasser<I extends IT> = (n, f, cb, w, t) => BaseCheck<I>;
|
package/src/run.ts
CHANGED
|
@@ -3,7 +3,7 @@ import readline from "readline";
|
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
import { PM_Main } from "./PM/main";
|
|
6
|
-
import {
|
|
6
|
+
import { ITestconfig, IBuiltConfig, IProject } from "./Types";
|
|
7
7
|
|
|
8
8
|
readline.emitKeypressEvents(process.stdin);
|
|
9
9
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
@@ -27,12 +27,9 @@ if (mode !== "once" && mode !== "dev") {
|
|
|
27
27
|
console.log("testeranto is running", testName, mode);
|
|
28
28
|
|
|
29
29
|
import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
30
|
-
|
|
31
|
-
const bigConfig: IConfigV2 = module.default;
|
|
30
|
+
const bigConfig: IProject = module.default;
|
|
32
31
|
|
|
33
|
-
const rawConfig:
|
|
34
|
-
|
|
35
|
-
// const rawConfig: IBaseConfig = module.default;
|
|
32
|
+
const rawConfig: ITestconfig = bigConfig.projects[testName];
|
|
36
33
|
|
|
37
34
|
const config: IBuiltConfig = {
|
|
38
35
|
...rawConfig,
|
package/src/utils.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
|
|
3
|
-
import { IRunTime,
|
|
3
|
+
import { IBuiltConfig, IRunTime, ITestTypes } from "./Types";
|
|
4
|
+
import { IRunnables } from "./lib";
|
|
4
5
|
|
|
5
6
|
export type ISummary = Record<
|
|
6
7
|
string,
|
|
@@ -26,7 +27,7 @@ export const destinationOfRuntime = (
|
|
|
26
27
|
|
|
27
28
|
export const tscPather = (
|
|
28
29
|
entryPoint: string,
|
|
29
|
-
platform:
|
|
30
|
+
platform: IRunTime,
|
|
30
31
|
projectName: string
|
|
31
32
|
) => {
|
|
32
33
|
return path.join(
|
|
@@ -41,7 +42,7 @@ export const tscPather = (
|
|
|
41
42
|
|
|
42
43
|
export const lintPather = (
|
|
43
44
|
entryPoint: string,
|
|
44
|
-
platform:
|
|
45
|
+
platform: IRunTime,
|
|
45
46
|
projectName: string
|
|
46
47
|
) => {
|
|
47
48
|
return path.join(
|
|
@@ -56,7 +57,7 @@ export const lintPather = (
|
|
|
56
57
|
|
|
57
58
|
export const bddPather = (
|
|
58
59
|
entryPoint: string,
|
|
59
|
-
platform:
|
|
60
|
+
platform: IRunTime,
|
|
60
61
|
projectName: string
|
|
61
62
|
) => {
|
|
62
63
|
return path.join(
|
|
@@ -71,7 +72,7 @@ export const bddPather = (
|
|
|
71
72
|
|
|
72
73
|
export const promptPather = (
|
|
73
74
|
entryPoint: string,
|
|
74
|
-
platform:
|
|
75
|
+
platform: IRunTime,
|
|
75
76
|
projectName: string
|
|
76
77
|
) => {
|
|
77
78
|
return path.join(
|
|
@@ -83,3 +84,47 @@ export const promptPather = (
|
|
|
83
84
|
`prompt.txt`
|
|
84
85
|
);
|
|
85
86
|
};
|
|
87
|
+
|
|
88
|
+
export const getRunnables = (
|
|
89
|
+
tests: ITestTypes[],
|
|
90
|
+
projectName: string,
|
|
91
|
+
payload = {
|
|
92
|
+
nodeEntryPoints: {},
|
|
93
|
+
webEntryPoints: {},
|
|
94
|
+
importEntryPoints: {},
|
|
95
|
+
}
|
|
96
|
+
): IRunnables => {
|
|
97
|
+
return tests.reduce((pt, cv, cndx, cry) => {
|
|
98
|
+
if (cv[1] === "node") {
|
|
99
|
+
pt.nodeEntryPoints[cv[0]] = path.resolve(
|
|
100
|
+
`./testeranto/bundles/node/${projectName}/${cv[0]
|
|
101
|
+
.split(".")
|
|
102
|
+
.slice(0, -1)
|
|
103
|
+
.concat("mjs")
|
|
104
|
+
.join(".")}`
|
|
105
|
+
);
|
|
106
|
+
} else if (cv[1] === "web") {
|
|
107
|
+
pt.webEntryPoints[cv[0]] = path.resolve(
|
|
108
|
+
`./testeranto/bundles/web/${projectName}/${cv[0]
|
|
109
|
+
.split(".")
|
|
110
|
+
.slice(0, -1)
|
|
111
|
+
.concat("mjs")
|
|
112
|
+
.join(".")}`
|
|
113
|
+
);
|
|
114
|
+
} else if (cv[1] === "pure") {
|
|
115
|
+
pt.importEntryPoints[cv[0]] = path.resolve(
|
|
116
|
+
`./testeranto/bundles/pure/${projectName}/${cv[0]
|
|
117
|
+
.split(".")
|
|
118
|
+
.slice(0, -1)
|
|
119
|
+
.concat("mjs")
|
|
120
|
+
.join(".")}`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// if (cv[3].length) {
|
|
125
|
+
// getRunnables(cv[3], testName, payload);
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
return pt;
|
|
129
|
+
}, payload as IRunnables);
|
|
130
|
+
};
|