testeranto 0.121.1 → 0.125.1
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 +32 -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/TestReport.tsx
CHANGED
|
@@ -26,8 +26,8 @@ const TestPane = ({ given }: {
|
|
|
26
26
|
given: {
|
|
27
27
|
key: string,
|
|
28
28
|
name: string,
|
|
29
|
-
error
|
|
30
|
-
features
|
|
29
|
+
error?: string[],
|
|
30
|
+
features?: string[],
|
|
31
31
|
whens: {
|
|
32
32
|
name: string;
|
|
33
33
|
error: string;
|
|
@@ -184,8 +184,11 @@ const BddPage = () => {
|
|
|
184
184
|
document.addEventListener("DOMContentLoaded", function () {
|
|
185
185
|
const elem = document.getElementById("root");
|
|
186
186
|
if (elem) {
|
|
187
|
-
|
|
187
|
+
if (elem) {
|
|
188
|
+
const root = ReactDom.createRoot(elem);
|
|
189
|
+
root.render(React.createElement(BddPage, {}));
|
|
190
|
+
}
|
|
188
191
|
}
|
|
189
192
|
});
|
|
190
193
|
|
|
191
|
-
console.log("hello BddPage!")
|
|
194
|
+
console.log("hello BddPage!")
|
package/src/Types.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin } from "esbuild";
|
|
2
|
+
|
|
3
|
+
import { ITTestResourceConfiguration } from "./lib/index.js";
|
|
2
4
|
import {
|
|
3
5
|
IGivens,
|
|
4
6
|
BaseCheck,
|
|
@@ -7,133 +9,84 @@ import {
|
|
|
7
9
|
BaseThen,
|
|
8
10
|
BaseGiven,
|
|
9
11
|
} from "./lib/abstractBase.js";
|
|
12
|
+
import { IPM, ITestCheckCallback } from "./lib/types.js";
|
|
10
13
|
import { PM } from "./PM/index.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
I extends Ibdd_in<
|
|
15
|
-
unknown,
|
|
16
|
-
unknown,
|
|
17
|
-
unknown,
|
|
18
|
-
unknown,
|
|
19
|
-
unknown,
|
|
20
|
-
unknown,
|
|
21
|
-
unknown
|
|
22
|
-
>
|
|
23
|
-
> = {
|
|
24
|
-
assertThis: (x: I["then"]) => void;
|
|
14
|
+
|
|
15
|
+
export type ITestInterface<I extends IT = IT> = {
|
|
16
|
+
assertThis: (x: I["then"]) => any;
|
|
25
17
|
andWhen: (
|
|
26
18
|
store: I["istore"],
|
|
27
19
|
whenCB: I["when"],
|
|
28
20
|
testResource: ITTestResourceConfiguration,
|
|
29
|
-
pm:
|
|
21
|
+
pm: IPM
|
|
30
22
|
) => Promise<I["istore"]>;
|
|
31
23
|
butThen: (
|
|
32
24
|
store: I["istore"],
|
|
33
25
|
thenCB: I["then"],
|
|
34
26
|
testResource: ITTestResourceConfiguration,
|
|
35
|
-
pm:
|
|
27
|
+
pm: IPM
|
|
36
28
|
) => Promise<I["iselection"]>;
|
|
37
|
-
afterAll: (store: I["istore"], pm:
|
|
38
|
-
afterEach: (store: I["istore"], key: string, pm:
|
|
29
|
+
afterAll: (store: I["istore"], pm: IPM) => any;
|
|
30
|
+
afterEach: (store: I["istore"], key: string, pm: IPM) => Promise<unknown>;
|
|
39
31
|
beforeAll: (
|
|
40
32
|
input: I["iinput"],
|
|
41
33
|
testResource: ITTestResourceConfiguration,
|
|
42
|
-
pm:
|
|
34
|
+
pm: IPM
|
|
43
35
|
) => Promise<I["isubject"]>;
|
|
44
36
|
beforeEach: (
|
|
45
37
|
subject: I["isubject"],
|
|
46
38
|
initializer: (c?) => I["given"],
|
|
47
39
|
testResource: ITTestResourceConfiguration,
|
|
48
40
|
initialValues,
|
|
49
|
-
pm:
|
|
41
|
+
pm: IPM
|
|
50
42
|
) => Promise<I["istore"]>;
|
|
51
43
|
};
|
|
52
44
|
|
|
53
|
-
export type IWebTestInterface<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
> = ITestInterface<I>;
|
|
64
|
-
|
|
65
|
-
export type INodeTestInterface<
|
|
66
|
-
I extends Ibdd_in<
|
|
67
|
-
unknown,
|
|
68
|
-
unknown,
|
|
69
|
-
unknown,
|
|
70
|
-
unknown,
|
|
71
|
-
unknown,
|
|
72
|
-
unknown,
|
|
73
|
-
unknown
|
|
74
|
-
>
|
|
75
|
-
> = ITestInterface<I>;
|
|
76
|
-
|
|
77
|
-
export type IPartialInterface<
|
|
78
|
-
I extends Ibdd_in<
|
|
79
|
-
unknown,
|
|
80
|
-
unknown,
|
|
81
|
-
unknown,
|
|
82
|
-
unknown,
|
|
83
|
-
unknown,
|
|
84
|
-
unknown,
|
|
85
|
-
unknown
|
|
86
|
-
>
|
|
87
|
-
> = Partial<ITestInterface<I>>;
|
|
88
|
-
|
|
89
|
-
export type IPartialNodeInterface<
|
|
90
|
-
I extends Ibdd_in<
|
|
91
|
-
unknown,
|
|
92
|
-
unknown,
|
|
93
|
-
unknown,
|
|
94
|
-
unknown,
|
|
95
|
-
unknown,
|
|
96
|
-
unknown,
|
|
97
|
-
unknown
|
|
98
|
-
>
|
|
99
|
-
> = Partial<INodeTestInterface<I>>;
|
|
100
|
-
export type IPartialWebInterface<
|
|
101
|
-
I extends Ibdd_in<
|
|
102
|
-
unknown,
|
|
103
|
-
unknown,
|
|
104
|
-
unknown,
|
|
105
|
-
unknown,
|
|
106
|
-
unknown,
|
|
107
|
-
unknown,
|
|
108
|
-
unknown
|
|
109
|
-
>
|
|
110
|
-
> = Partial<IWebTestInterface<I>>;
|
|
45
|
+
export type IWebTestInterface<I extends IT> = ITestInterface<I>;
|
|
46
|
+
|
|
47
|
+
export type INodeTestInterface<I extends IT> = ITestInterface<I>;
|
|
48
|
+
|
|
49
|
+
export type IPartialInterface<I extends IT> = Partial<ITestInterface<I>>;
|
|
50
|
+
|
|
51
|
+
export type IPartialNodeInterface<I extends IT> = Partial<
|
|
52
|
+
INodeTestInterface<I>
|
|
53
|
+
>;
|
|
54
|
+
export type IPartialWebInterface<I extends IT> = Partial<IWebTestInterface<I>>;
|
|
111
55
|
|
|
112
56
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
113
57
|
|
|
114
|
-
export type
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
58
|
+
export type IT = Ibdd_in<
|
|
59
|
+
unknown,
|
|
60
|
+
unknown,
|
|
61
|
+
unknown,
|
|
62
|
+
unknown,
|
|
63
|
+
unknown,
|
|
64
|
+
unknown,
|
|
65
|
+
unknown
|
|
66
|
+
>;
|
|
67
|
+
|
|
68
|
+
export type OT = Ibdd_out<
|
|
69
|
+
Record<string, any>,
|
|
70
|
+
Record<string, any>,
|
|
71
|
+
Record<string, any>,
|
|
72
|
+
Record<string, any>,
|
|
73
|
+
Record<string, any>
|
|
74
|
+
>;
|
|
75
|
+
|
|
76
|
+
// export type MT<O extends OT> = Partial<{
|
|
77
|
+
// suites: { [K in keyof O["suites"]]: unknown };
|
|
78
|
+
// givens: { [K in keyof O["givens"]]: unknown };
|
|
79
|
+
// whens: { [K in keyof O["whens"]]: unknown };
|
|
80
|
+
// thens: { [K in keyof O["thens"]]: unknown };
|
|
81
|
+
// checks: { [K in keyof O["checks"]]: unknown };
|
|
82
|
+
// }>;
|
|
83
|
+
|
|
84
|
+
export type ITestSpecification<I extends IT, O extends OT> = (
|
|
132
85
|
Suite: {
|
|
133
86
|
[K in keyof O["suites"]]: (
|
|
134
87
|
name: string,
|
|
135
88
|
givens: IGivens<I>,
|
|
136
|
-
checks: BaseCheck<I
|
|
89
|
+
checks: BaseCheck<I>[]
|
|
137
90
|
) => BaseSuite<I, O>;
|
|
138
91
|
},
|
|
139
92
|
Given: {
|
|
@@ -156,54 +109,44 @@ export type ITestSpecification<
|
|
|
156
109
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
157
110
|
|
|
158
111
|
export type ITestImplementation<
|
|
159
|
-
I extends
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
thens: {
|
|
188
|
-
[K in keyof O["thens"]]: (
|
|
189
|
-
...It: O["thens"][K]
|
|
190
|
-
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
191
|
-
};
|
|
192
|
-
checks: {
|
|
193
|
-
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
194
|
-
};
|
|
195
|
-
};
|
|
112
|
+
I extends IT,
|
|
113
|
+
O extends OT,
|
|
114
|
+
modifier = {}
|
|
115
|
+
> = Modify<
|
|
116
|
+
{
|
|
117
|
+
suites: {
|
|
118
|
+
[K in keyof O["suites"]]: string;
|
|
119
|
+
};
|
|
120
|
+
givens: {
|
|
121
|
+
[K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
122
|
+
};
|
|
123
|
+
whens: {
|
|
124
|
+
[K in keyof O["whens"]]: (
|
|
125
|
+
...Iw: O["whens"][K]
|
|
126
|
+
) => (zel: I["iselection"], utils: PM) => Promise<I["when"]>;
|
|
127
|
+
};
|
|
128
|
+
thens: {
|
|
129
|
+
[K in keyof O["thens"]]: (
|
|
130
|
+
...It: O["thens"][K]
|
|
131
|
+
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
132
|
+
};
|
|
133
|
+
checks: {
|
|
134
|
+
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
modifier
|
|
138
|
+
>;
|
|
196
139
|
|
|
197
140
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
198
141
|
|
|
199
142
|
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
200
143
|
|
|
201
144
|
export type Ibdd_out<
|
|
202
|
-
ISuites extends Record<string, any>,
|
|
203
|
-
IGivens extends Record<string, any>,
|
|
204
|
-
IWhens extends Record<string, any>,
|
|
205
|
-
IThens extends Record<string, any>,
|
|
206
|
-
IChecks extends Record<string, any>
|
|
145
|
+
ISuites extends Record<string, any> = Record<string, any>,
|
|
146
|
+
IGivens extends Record<string, any> = Record<string, any>,
|
|
147
|
+
IWhens extends Record<string, any> = Record<string, any>,
|
|
148
|
+
IThens extends Record<string, any> = Record<string, any>,
|
|
149
|
+
IChecks extends Record<string, any> = Record<string, any>
|
|
207
150
|
> = {
|
|
208
151
|
suites: ISuites;
|
|
209
152
|
givens: IGivens;
|
|
@@ -229,3 +172,34 @@ export type Ibdd_in<
|
|
|
229
172
|
when: IWhen;
|
|
230
173
|
then: IThen;
|
|
231
174
|
};
|
|
175
|
+
|
|
176
|
+
///////////////////////////////////////////////
|
|
177
|
+
|
|
178
|
+
export type IPluginFactory = (
|
|
179
|
+
register: (entrypoint: string, sources: string[]) => any,
|
|
180
|
+
entrypoints: string[]
|
|
181
|
+
) => Plugin;
|
|
182
|
+
|
|
183
|
+
export type IRunTime = `node` | `web` | "pure";
|
|
184
|
+
|
|
185
|
+
export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
|
|
186
|
+
|
|
187
|
+
export type ITestconfig = {
|
|
188
|
+
clearScreen: boolean;
|
|
189
|
+
debugger: boolean;
|
|
190
|
+
externals: string[];
|
|
191
|
+
featureIngestor: (s: string) => Promise<string>;
|
|
192
|
+
importPlugins: IPluginFactory[];
|
|
193
|
+
minify: boolean;
|
|
194
|
+
nodePlugins: IPluginFactory[];
|
|
195
|
+
ports: string[];
|
|
196
|
+
src: string;
|
|
197
|
+
tests: ITestTypes[];
|
|
198
|
+
webPlugins: IPluginFactory[];
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export type IBuiltConfig = { buildDir: string } & ITestconfig;
|
|
202
|
+
|
|
203
|
+
export type IProject = {
|
|
204
|
+
projects: Record<string, ITestconfig>;
|
|
205
|
+
};
|
package/src/Web.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { PM_Web } from "./PM/web";
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
Ibdd_out,
|
|
3
|
+
IT,
|
|
5
4
|
ITestImplementation,
|
|
6
5
|
ITestInterface,
|
|
7
6
|
ITestSpecification,
|
|
8
7
|
IWebTestInterface,
|
|
8
|
+
OT,
|
|
9
9
|
} from "./Types";
|
|
10
10
|
import Testeranto from "./lib/core.js";
|
|
11
11
|
import {
|
|
12
|
-
IFinalResults,
|
|
13
12
|
ITTestResourceConfiguration,
|
|
14
13
|
ITTestResourceRequest,
|
|
15
14
|
defaultTestResourceRequirement,
|
|
@@ -22,28 +21,15 @@ let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
|
22
21
|
// throw event;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export class WebTesteranto<
|
|
26
|
-
I
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
unknown,
|
|
31
|
-
unknown,
|
|
32
|
-
unknown,
|
|
33
|
-
unknown
|
|
34
|
-
>,
|
|
35
|
-
O extends Ibdd_out<
|
|
36
|
-
Record<string, any>,
|
|
37
|
-
Record<string, any>,
|
|
38
|
-
Record<string, any>,
|
|
39
|
-
Record<string, any>,
|
|
40
|
-
Record<string, any>
|
|
41
|
-
>
|
|
42
|
-
> extends Testeranto<I, O> {
|
|
24
|
+
export class WebTesteranto<I extends IT, O extends OT, M> extends Testeranto<
|
|
25
|
+
I,
|
|
26
|
+
O,
|
|
27
|
+
M
|
|
28
|
+
> {
|
|
43
29
|
constructor(
|
|
44
30
|
input: I["iinput"],
|
|
45
31
|
testSpecification: ITestSpecification<I, O>,
|
|
46
|
-
testImplementation: ITestImplementation<I, O>,
|
|
32
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
47
33
|
testResourceRequirement: ITTestResourceRequest,
|
|
48
34
|
testInterface: Partial<ITestInterface<I>>
|
|
49
35
|
) {
|
|
@@ -92,39 +78,18 @@ export class WebTesteranto<
|
|
|
92
78
|
async receiveTestResourceConfig(partialTestResource: any) {
|
|
93
79
|
const t: ITTestResourceConfiguration = partialTestResource; //JSON.parse(partialTestResource);
|
|
94
80
|
const pm = new PM_Web(t);
|
|
95
|
-
|
|
96
|
-
await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
97
|
-
return new Promise<IFinalResults>((res, rej) => {
|
|
98
|
-
res({ features, failed });
|
|
99
|
-
});
|
|
81
|
+
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
100
82
|
}
|
|
101
83
|
}
|
|
102
84
|
|
|
103
|
-
export default async <
|
|
104
|
-
I extends Ibdd_in<
|
|
105
|
-
unknown,
|
|
106
|
-
unknown,
|
|
107
|
-
unknown,
|
|
108
|
-
unknown,
|
|
109
|
-
unknown,
|
|
110
|
-
unknown,
|
|
111
|
-
unknown
|
|
112
|
-
>,
|
|
113
|
-
O extends Ibdd_out<
|
|
114
|
-
Record<string, any>,
|
|
115
|
-
Record<string, any>,
|
|
116
|
-
Record<string, any>,
|
|
117
|
-
Record<string, any>,
|
|
118
|
-
Record<string, any>
|
|
119
|
-
>
|
|
120
|
-
>(
|
|
85
|
+
export default async <I extends IT, O extends OT, M>(
|
|
121
86
|
input: I["iinput"],
|
|
122
87
|
testSpecification: ITestSpecification<I, O>,
|
|
123
|
-
testImplementation: ITestImplementation<I, O>,
|
|
88
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
124
89
|
testInterface: Partial<IWebTestInterface<I>>,
|
|
125
90
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
|
|
126
|
-
): Promise<Testeranto<I, O>> => {
|
|
127
|
-
return new WebTesteranto<I, O>(
|
|
91
|
+
): Promise<Testeranto<I, O, M>> => {
|
|
92
|
+
return new WebTesteranto<I, O, M>(
|
|
128
93
|
input,
|
|
129
94
|
testSpecification,
|
|
130
95
|
testImplementation,
|
package/src/build.ts
CHANGED
|
@@ -2,20 +2,21 @@ import ansiC from "ansi-colors";
|
|
|
2
2
|
import fs, { watch } from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import readline from "readline";
|
|
5
|
-
import { glob } from "glob";
|
|
6
5
|
import esbuild from "esbuild";
|
|
7
6
|
|
|
8
7
|
import esbuildNodeConfiger from "./esbuildConfigs/node.js";
|
|
9
8
|
import esbuildWebConfiger from "./esbuildConfigs/web.js";
|
|
9
|
+
import esbuildImportConfiger from "./esbuildConfigs/pure.js";
|
|
10
10
|
import webHtmlFrame from "./web.html.js";
|
|
11
|
+
|
|
12
|
+
import { getRunnables } from "./utils.js";
|
|
11
13
|
import {
|
|
12
|
-
|
|
13
|
-
IRunnables,
|
|
14
|
-
IBaseConfig,
|
|
15
|
-
IRunTime,
|
|
14
|
+
ITestconfig,
|
|
16
15
|
IBuiltConfig,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
IProject,
|
|
17
|
+
IRunTime,
|
|
18
|
+
ITestTypes,
|
|
19
|
+
} from "./Types.js";
|
|
19
20
|
|
|
20
21
|
readline.emitKeypressEvents(process.stdin);
|
|
21
22
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
@@ -31,7 +32,7 @@ if (mode !== "once" && mode !== "dev") {
|
|
|
31
32
|
console.log("testeranto is building", testName, mode);
|
|
32
33
|
|
|
33
34
|
import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
34
|
-
const bigConfig:
|
|
35
|
+
const bigConfig: IProject = module.default;
|
|
35
36
|
|
|
36
37
|
const project = bigConfig.projects[testName];
|
|
37
38
|
if (!project) {
|
|
@@ -39,7 +40,7 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
39
40
|
process.exit(-1);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
const rawConfig:
|
|
43
|
+
const rawConfig: ITestconfig = bigConfig.projects[testName];
|
|
43
44
|
|
|
44
45
|
const getSecondaryEndpointsPoints = (runtime?: IRunTime): string[] => {
|
|
45
46
|
const meta = (ts: ITestTypes[], st: Set<string>): Set<string> => {
|
|
@@ -80,10 +81,14 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
80
81
|
});
|
|
81
82
|
let nodeDone: boolean = false;
|
|
82
83
|
let webDone: boolean = false;
|
|
84
|
+
let importDone: boolean = false;
|
|
83
85
|
|
|
84
86
|
let status: "build" | "built" = "build";
|
|
85
87
|
|
|
86
|
-
const { nodeEntryPoints, webEntryPoints } = getRunnables(
|
|
88
|
+
const { nodeEntryPoints, webEntryPoints, importEntryPoints } = getRunnables(
|
|
89
|
+
config.tests,
|
|
90
|
+
testName
|
|
91
|
+
);
|
|
87
92
|
|
|
88
93
|
const onNodeDone = () => {
|
|
89
94
|
nodeDone = true;
|
|
@@ -95,11 +100,16 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
95
100
|
onDone();
|
|
96
101
|
};
|
|
97
102
|
|
|
103
|
+
const onImportDone = () => {
|
|
104
|
+
importDone = true;
|
|
105
|
+
onDone();
|
|
106
|
+
};
|
|
107
|
+
|
|
98
108
|
const onDone = async () => {
|
|
99
|
-
if (nodeDone && webDone) {
|
|
109
|
+
if (nodeDone && webDone && importDone) {
|
|
100
110
|
status = "built";
|
|
101
111
|
}
|
|
102
|
-
if (nodeDone && webDone && mode === "once") {
|
|
112
|
+
if (nodeDone && webDone && importDone && mode === "once") {
|
|
103
113
|
console.log(ansiC.inverse(`${testName} has been built. Goodbye.`));
|
|
104
114
|
process.exit();
|
|
105
115
|
}
|
|
@@ -204,73 +214,37 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
204
214
|
)
|
|
205
215
|
);
|
|
206
216
|
|
|
207
|
-
glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
208
|
-
|
|
209
|
-
}).then((chunks) => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
});
|
|
217
|
+
// glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
218
|
+
// ignore: "node_modules/**",
|
|
219
|
+
// }).then((chunks) => {
|
|
220
|
+
// chunks.forEach((chunk) => {
|
|
221
|
+
// fs.unlinkSync(chunk);
|
|
222
|
+
// });
|
|
223
|
+
// });
|
|
214
224
|
|
|
215
225
|
await Promise.all([
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
await webContext.watch().then((v) => {
|
|
240
|
-
onWebDone();
|
|
241
|
-
});
|
|
242
|
-
} else {
|
|
243
|
-
webContext.rebuild().then((v) => {
|
|
244
|
-
onWebDone();
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
return webContext;
|
|
248
|
-
}),
|
|
226
|
+
...(
|
|
227
|
+
[
|
|
228
|
+
[esbuildImportConfiger, importEntryPoints, onImportDone],
|
|
229
|
+
[esbuildNodeConfiger, nodeEntryPoints, onNodeDone],
|
|
230
|
+
[esbuildWebConfiger, webEntryPoints, onWebDone],
|
|
231
|
+
] as [(a, b, c) => any, Record<string, string>, () => void][]
|
|
232
|
+
).map(([configer, entryPoints, done]) => {
|
|
233
|
+
esbuild
|
|
234
|
+
.context(configer(config, Object.keys(entryPoints), testName))
|
|
235
|
+
.then(async (ctx) => {
|
|
236
|
+
if (mode === "dev") {
|
|
237
|
+
await ctx.watch().then((v) => {
|
|
238
|
+
done();
|
|
239
|
+
});
|
|
240
|
+
} else {
|
|
241
|
+
ctx.rebuild().then((v) => {
|
|
242
|
+
done();
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return ctx;
|
|
247
|
+
});
|
|
248
|
+
}),
|
|
249
249
|
]);
|
|
250
250
|
});
|
|
251
|
-
|
|
252
|
-
const getRunnables = (
|
|
253
|
-
tests: ITestTypes[],
|
|
254
|
-
payload = {
|
|
255
|
-
nodeEntryPoints: {},
|
|
256
|
-
webEntryPoints: {},
|
|
257
|
-
}
|
|
258
|
-
): IRunnables => {
|
|
259
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
260
|
-
if (cv[1] === "node") {
|
|
261
|
-
pt.nodeEntryPoints[cv[0]] = path.resolve(
|
|
262
|
-
`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
263
|
-
);
|
|
264
|
-
} else if (cv[1] === "web") {
|
|
265
|
-
pt.webEntryPoints[cv[0]] = path.resolve(
|
|
266
|
-
`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (cv[3].length) {
|
|
271
|
-
getRunnables(cv[3], payload);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return pt;
|
|
275
|
-
}, payload as IRunnables);
|
|
276
|
-
};
|
package/src/defaultConfig.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITestconfig } from "./lib";
|
|
2
2
|
|
|
3
|
-
const config:
|
|
3
|
+
const config: ITestconfig = {
|
|
4
4
|
src: "src",
|
|
5
|
-
// outdir: "docs",
|
|
6
5
|
tests: [],
|
|
7
6
|
debugger: true,
|
|
8
7
|
clearScreen: false,
|
|
9
|
-
devMode: true,
|
|
10
8
|
minify: false,
|
|
11
|
-
// outbase: ".",
|
|
12
9
|
ports: ["3001"],
|
|
13
10
|
externals: [],
|
|
14
11
|
nodePlugins: [],
|
|
15
12
|
webPlugins: [],
|
|
13
|
+
importPlugins: [],
|
|
16
14
|
featureIngestor: function (s: string): Promise<string> {
|
|
17
15
|
throw new Error("Function not implemented.");
|
|
18
16
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ITestconfig } from "../lib";
|
|
4
4
|
|
|
5
|
-
export default (config:
|
|
5
|
+
export default (config: ITestconfig): BuildOptions => {
|
|
6
6
|
return {
|
|
7
7
|
// packages: "external",
|
|
8
8
|
target: "esnext",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import type { Plugin } from "esbuild";
|
|
3
|
+
import { IRunTime } from "../lib";
|
|
3
4
|
|
|
4
5
|
const otherInputs: Record<string, Set<string>> = {};
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ const register = (entrypoint: string, sources: string[]): void => {
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export default (
|
|
14
|
-
platform:
|
|
15
|
+
platform: IRunTime,
|
|
15
16
|
testName: string
|
|
16
17
|
): {
|
|
17
18
|
register: (entrypoint: string, sources: string[]) => void;
|