testeranto 0.114.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 +15 -1
- package/bundle.js +1 -1
- package/dist/common/src/Init.js +31 -0
- package/dist/common/src/Node.js +49 -0
- package/dist/common/src/PM/base.js +230 -0
- package/dist/common/src/PM/main.js +1026 -0
- 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/src/build.js +223 -0
- package/dist/common/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -1
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +7 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +7 -4
- package/dist/common/src/esbuildConfigs/pure.js +41 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +8 -5
- 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/src/init-docs.js +9 -0
- package/dist/common/{lib → src/lib}/abstractBase.js +99 -95
- package/dist/common/{lib → src/lib}/basebuilder.js +24 -20
- package/dist/common/{lib → src/lib}/classBuilder.js +8 -5
- package/dist/common/{lib → src/lib}/core.js +10 -60
- package/dist/common/{lib → src/lib}/index.js +7 -2
- package/dist/common/{run.js → src/run.js} +12 -4
- package/dist/common/src/utils.js +65 -0
- package/dist/common/testeranto.config.js +41 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +26 -0
- package/dist/module/src/Node.js +42 -0
- package/dist/module/src/PM/base.js +223 -0
- package/dist/module/src/PM/main.js +986 -0
- 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/src/Project.js +120 -0
- 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} +26 -14
- package/dist/module/{Web.js → src/Web.js} +1 -4
- package/dist/module/src/build.js +185 -0
- package/dist/module/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -1
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +7 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +7 -4
- package/dist/module/src/esbuildConfigs/pure.js +36 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +8 -5
- 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/src/init-docs.js +4 -0
- package/dist/module/{lib → src/lib}/abstractBase.js +99 -95
- package/dist/module/{lib → src/lib}/basebuilder.js +24 -20
- package/dist/module/{lib → src/lib}/classBuilder.js +8 -5
- package/dist/module/{lib → src/lib}/core.js +10 -60
- package/dist/module/{lib → src/lib}/index.js +7 -2
- package/dist/module/{run.js → src/run.js} +12 -4
- 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.css +11367 -0
- package/dist/prebuild/Project.js +24643 -0
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +13 -12
- package/dist/prebuild/build.mjs +217 -106
- package/dist/prebuild/init-docs.mjs +29 -83
- package/dist/prebuild/run.mjs +803 -686
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Init.d.ts +2 -0
- 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/src/PM/main.d.ts +47 -0
- 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 +47 -34
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +7 -9
- 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 +33 -12
- package/src/Init.ts +29 -75
- package/src/Node.ts +42 -46
- package/src/PM/base.ts +299 -0
- package/src/PM/index.ts +28 -21
- package/src/PM/main.ts +569 -819
- 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 +200 -0
- 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 +37 -19
- package/src/Types.ts +114 -140
- package/src/Web.ts +13 -48
- package/src/build.ts +153 -143
- package/src/defaultConfig.ts +3 -5
- package/src/esbuildConfigs/index.ts +3 -3
- package/src/esbuildConfigs/inputFilesPlugin.ts +9 -7
- package/src/esbuildConfigs/node.ts +10 -6
- package/src/esbuildConfigs/pure.ts +72 -0
- package/src/esbuildConfigs/web.ts +11 -7
- package/src/examples/react/component/index.tsx +35 -0
- package/src/examples/react/component/test.ts +83 -0
- package/src/init-docs.ts +2 -15
- package/src/lib/abstractBase.ts +188 -260
- package/src/lib/basebuilder.ts +47 -48
- package/src/lib/classBuilder.ts +28 -35
- package/src/lib/core.ts +35 -102
- package/src/lib/index.ts +37 -65
- package/src/lib/types.ts +23 -98
- package/src/run.ts +18 -5
- package/src/utils.ts +73 -40
- 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 +53 -76
- package/type-fix.txt +2 -0
- package/dist/common/Init.js +0 -68
- package/dist/common/PM/main.js +0 -1176
- 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/common/build.js +0 -222
- package/dist/common/init-docs.js +0 -53
- package/dist/common/puppeteerConfiger.js +0 -24
- package/dist/common/utils.js +0 -43
- package/dist/module/Init.js +0 -63
- package/dist/module/PM/main.js +0 -1136
- 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/build.js +0 -184
- package/dist/module/init-docs.js +0 -15
- package/dist/module/puppeteerConfiger.js +0 -19
- package/dist/module/utils.js +0 -29
- package/dist/types/Init.d.ts +0 -2
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/main.d.ts +0 -66
- 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 -14
- package/dist/types/puppeteerConfiger.d.ts +0 -4
- package/dist/types/utils.d.ts +0 -15
- package/src/puppeteerConfiger.ts +0 -26
- /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/{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/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +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/abstractBase.ts
CHANGED
|
@@ -1,59 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import { PM } from "../PM/index.js";
|
|
1
|
+
import { IT, OT } from "../Types.js";
|
|
3
2
|
|
|
4
3
|
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
unknown,
|
|
11
|
-
unknown,
|
|
12
|
-
unknown,
|
|
13
|
-
unknown,
|
|
14
|
-
unknown,
|
|
15
|
-
unknown,
|
|
16
|
-
unknown
|
|
17
|
-
>
|
|
18
|
-
> = Record<string, BaseGiven<I>>;
|
|
19
|
-
|
|
20
|
-
export abstract class BaseSuite<
|
|
21
|
-
I extends Ibdd_in<
|
|
22
|
-
unknown,
|
|
23
|
-
unknown,
|
|
24
|
-
unknown,
|
|
25
|
-
unknown,
|
|
26
|
-
unknown,
|
|
27
|
-
unknown,
|
|
28
|
-
unknown
|
|
29
|
-
>,
|
|
30
|
-
O extends Ibdd_out<
|
|
31
|
-
Record<string, any>,
|
|
32
|
-
Record<string, any>,
|
|
33
|
-
Record<string, any>,
|
|
34
|
-
Record<string, any>,
|
|
35
|
-
Record<string, any>
|
|
36
|
-
>
|
|
37
|
-
> {
|
|
4
|
+
import { IPM } from "./types.js";
|
|
5
|
+
|
|
6
|
+
export type IGivens<I extends IT> = Record<string, BaseGiven<I>>;
|
|
7
|
+
|
|
8
|
+
export abstract class BaseSuite<I extends IT = IT, O extends OT = OT> {
|
|
38
9
|
name: string;
|
|
39
10
|
givens: IGivens<I>;
|
|
40
|
-
checks: BaseCheck<I
|
|
11
|
+
checks: BaseCheck<I>[];
|
|
41
12
|
store: I["istore"];
|
|
42
|
-
fails: BaseGiven<I>[];
|
|
43
13
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
44
14
|
index: number;
|
|
15
|
+
failed: boolean;
|
|
16
|
+
fails: number;
|
|
45
17
|
|
|
46
18
|
constructor(
|
|
47
19
|
name: string,
|
|
48
20
|
index: number,
|
|
49
21
|
givens: IGivens<I> = {},
|
|
50
|
-
checks: BaseCheck<I
|
|
22
|
+
checks: BaseCheck<I>[] = []
|
|
51
23
|
) {
|
|
52
24
|
this.name = name;
|
|
53
25
|
this.index = index;
|
|
54
26
|
this.givens = givens;
|
|
55
27
|
this.checks = checks;
|
|
56
|
-
this.fails =
|
|
28
|
+
this.fails = 0;
|
|
57
29
|
}
|
|
58
30
|
|
|
59
31
|
public features() {
|
|
@@ -63,20 +35,19 @@ export abstract class BaseSuite<
|
|
|
63
35
|
.filter((value, index, array) => {
|
|
64
36
|
return array.indexOf(value) === index;
|
|
65
37
|
});
|
|
66
|
-
// .reduce((mm, lm) => {
|
|
67
|
-
// mm[lm] = lm;
|
|
68
|
-
// return mm;
|
|
69
|
-
// }, {});
|
|
70
38
|
return features || [];
|
|
71
39
|
}
|
|
72
40
|
|
|
73
41
|
public toObj() {
|
|
74
42
|
const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
|
|
43
|
+
const checks = Object.keys(this.checks).map((k) => this.checks[k].toObj());
|
|
75
44
|
|
|
76
45
|
return {
|
|
77
46
|
name: this.name,
|
|
78
47
|
givens,
|
|
48
|
+
checks,
|
|
79
49
|
fails: this.fails,
|
|
50
|
+
failed: this.failed,
|
|
80
51
|
features: this.features(),
|
|
81
52
|
};
|
|
82
53
|
}
|
|
@@ -85,16 +56,16 @@ export abstract class BaseSuite<
|
|
|
85
56
|
s: I["iinput"],
|
|
86
57
|
artifactory: ITestArtifactory,
|
|
87
58
|
tr: ITTestResourceConfiguration,
|
|
88
|
-
pm:
|
|
59
|
+
pm: IPM
|
|
89
60
|
): Promise<I["isubject"]> {
|
|
90
61
|
return new Promise((res) => res(s as unknown as I["isubject"]));
|
|
91
62
|
}
|
|
92
63
|
|
|
93
|
-
assertThat(t: I["then"]):
|
|
94
|
-
return t;
|
|
64
|
+
assertThat(t: Awaited<I["then"]> | undefined): boolean {
|
|
65
|
+
return !!t;
|
|
95
66
|
}
|
|
96
67
|
|
|
97
|
-
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm:
|
|
68
|
+
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: IPM) {
|
|
98
69
|
return store;
|
|
99
70
|
}
|
|
100
71
|
|
|
@@ -103,10 +74,10 @@ export abstract class BaseSuite<
|
|
|
103
74
|
testResourceConfiguration: ITTestResourceConfiguration,
|
|
104
75
|
artifactory: (fPath: string, value: unknown) => void,
|
|
105
76
|
tLog: (...string) => void,
|
|
106
|
-
pm:
|
|
77
|
+
pm: IPM
|
|
107
78
|
): Promise<BaseSuite<I, O>> {
|
|
108
79
|
this.testResourceConfiguration = testResourceConfiguration;
|
|
109
|
-
tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
80
|
+
// tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
110
81
|
|
|
111
82
|
const suiteArtifactory = (fPath: string, value: unknown) =>
|
|
112
83
|
artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
|
|
@@ -116,39 +87,38 @@ export abstract class BaseSuite<
|
|
|
116
87
|
const sNdx = this.index;
|
|
117
88
|
const sName = this.name;
|
|
118
89
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
);
|
|
133
|
-
}
|
|
90
|
+
const beforeAllProxy = new Proxy(pm, {
|
|
91
|
+
get(target, prop, receiver) {
|
|
92
|
+
if (prop === "customScreenShot") {
|
|
93
|
+
return (opts, p) =>
|
|
94
|
+
target.customScreenShot(
|
|
95
|
+
{
|
|
96
|
+
...opts,
|
|
97
|
+
// path: `${filepath}/${opts.path}`,
|
|
98
|
+
path: `suite-${sNdx}/beforeAll/${opts.path}`,
|
|
99
|
+
},
|
|
100
|
+
p
|
|
101
|
+
);
|
|
102
|
+
}
|
|
134
103
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
104
|
+
if (prop === "writeFileSync") {
|
|
105
|
+
return (fp, contents) =>
|
|
106
|
+
target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
|
|
107
|
+
}
|
|
139
108
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
109
|
+
/* @ts-ignore:next-line */
|
|
110
|
+
return Reflect.get(...arguments);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
144
113
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
114
|
+
const subject = await this.setup(
|
|
115
|
+
input,
|
|
116
|
+
suiteArtifactory,
|
|
117
|
+
testResourceConfiguration,
|
|
118
|
+
beforeAllProxy
|
|
119
|
+
);
|
|
151
120
|
|
|
121
|
+
for (const [gKey, g] of Object.entries(this.givens)) {
|
|
152
122
|
const giver = this.givens[gKey];
|
|
153
123
|
try {
|
|
154
124
|
this.store = await giver.give(
|
|
@@ -162,12 +132,26 @@ export abstract class BaseSuite<
|
|
|
162
132
|
sNdx
|
|
163
133
|
);
|
|
164
134
|
} catch (e) {
|
|
165
|
-
|
|
166
|
-
this.fails.
|
|
135
|
+
this.failed = true;
|
|
136
|
+
this.fails = this.fails + 1;
|
|
137
|
+
// console.error(e);
|
|
138
|
+
// this.fails.push(giver);
|
|
167
139
|
// return this;
|
|
168
140
|
}
|
|
169
141
|
}
|
|
170
142
|
|
|
143
|
+
for (const [ndx, thater] of this.checks.entries()) {
|
|
144
|
+
await thater.check(
|
|
145
|
+
subject,
|
|
146
|
+
thater.name,
|
|
147
|
+
testResourceConfiguration,
|
|
148
|
+
this.assertThat,
|
|
149
|
+
suiteArtifactory,
|
|
150
|
+
tLog,
|
|
151
|
+
pm
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
171
155
|
try {
|
|
172
156
|
this.afterAll(
|
|
173
157
|
this.store,
|
|
@@ -181,18 +165,6 @@ export abstract class BaseSuite<
|
|
|
181
165
|
// return this;
|
|
182
166
|
}
|
|
183
167
|
|
|
184
|
-
// for (const [ndx, thater] of this.checks.entries()) {
|
|
185
|
-
// await thater.check(
|
|
186
|
-
// subject,
|
|
187
|
-
// thater.name,
|
|
188
|
-
// testResourceConfiguration,
|
|
189
|
-
// this.assertThat,
|
|
190
|
-
// suiteArtifactory,
|
|
191
|
-
// tLog,
|
|
192
|
-
// pm
|
|
193
|
-
// );
|
|
194
|
-
// }
|
|
195
|
-
|
|
196
168
|
// @TODO fix me
|
|
197
169
|
// for (const k of Object.keys(this.givens)) {
|
|
198
170
|
// const giver = this.givens[k];
|
|
@@ -211,17 +183,7 @@ export abstract class BaseSuite<
|
|
|
211
183
|
}
|
|
212
184
|
}
|
|
213
185
|
|
|
214
|
-
export abstract class BaseGiven<
|
|
215
|
-
I extends Ibdd_in<
|
|
216
|
-
unknown,
|
|
217
|
-
unknown,
|
|
218
|
-
unknown,
|
|
219
|
-
unknown,
|
|
220
|
-
unknown,
|
|
221
|
-
unknown,
|
|
222
|
-
unknown
|
|
223
|
-
>
|
|
224
|
-
> {
|
|
186
|
+
export abstract class BaseGiven<I extends IT = IT> {
|
|
225
187
|
name: string;
|
|
226
188
|
features: string[];
|
|
227
189
|
whens: BaseWhen<I>[];
|
|
@@ -233,6 +195,7 @@ export abstract class BaseGiven<
|
|
|
233
195
|
givenCB: I["given"];
|
|
234
196
|
initialValues: any;
|
|
235
197
|
key: string;
|
|
198
|
+
failed: boolean;
|
|
236
199
|
|
|
237
200
|
constructor(
|
|
238
201
|
name: string,
|
|
@@ -241,7 +204,6 @@ export abstract class BaseGiven<
|
|
|
241
204
|
thens: BaseThen<I>[],
|
|
242
205
|
givenCB: I["given"],
|
|
243
206
|
initialValues: any
|
|
244
|
-
// key: string
|
|
245
207
|
) {
|
|
246
208
|
this.name = name;
|
|
247
209
|
this.features = features;
|
|
@@ -251,16 +213,7 @@ export abstract class BaseGiven<
|
|
|
251
213
|
this.initialValues = initialValues;
|
|
252
214
|
}
|
|
253
215
|
|
|
254
|
-
beforeAll(
|
|
255
|
-
store: I["istore"],
|
|
256
|
-
// artifactory: ITestArtifactory
|
|
257
|
-
// subject,
|
|
258
|
-
initializer,
|
|
259
|
-
artifactory,
|
|
260
|
-
testResource,
|
|
261
|
-
initialValues,
|
|
262
|
-
pm
|
|
263
|
-
) {
|
|
216
|
+
beforeAll(store: I["istore"]) {
|
|
264
217
|
return store;
|
|
265
218
|
}
|
|
266
219
|
|
|
@@ -271,7 +224,7 @@ export abstract class BaseGiven<
|
|
|
271
224
|
whens: this.whens.map((w) => w.toObj()),
|
|
272
225
|
thens: this.thens.map((t) => t.toObj()),
|
|
273
226
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
274
|
-
|
|
227
|
+
failed: this.failed,
|
|
275
228
|
features: this.features,
|
|
276
229
|
};
|
|
277
230
|
}
|
|
@@ -282,14 +235,14 @@ export abstract class BaseGiven<
|
|
|
282
235
|
artifactory: ITestArtifactory,
|
|
283
236
|
givenCB: I["given"],
|
|
284
237
|
initialValues: any,
|
|
285
|
-
pm:
|
|
238
|
+
pm: IPM
|
|
286
239
|
): Promise<I["istore"]>;
|
|
287
240
|
|
|
288
241
|
async afterEach(
|
|
289
242
|
store: I["istore"],
|
|
290
243
|
key: string,
|
|
291
244
|
artifactory: ITestArtifactory,
|
|
292
|
-
pm:
|
|
245
|
+
pm: IPM
|
|
293
246
|
): Promise<unknown> {
|
|
294
247
|
return store;
|
|
295
248
|
}
|
|
@@ -303,7 +256,7 @@ export abstract class BaseGiven<
|
|
|
303
256
|
tester: (t: Awaited<I["then"]> | undefined) => boolean,
|
|
304
257
|
artifactory: ITestArtifactory,
|
|
305
258
|
tLog: ITLog,
|
|
306
|
-
pm:
|
|
259
|
+
pm: IPM,
|
|
307
260
|
suiteNdx: number
|
|
308
261
|
) {
|
|
309
262
|
this.key = key;
|
|
@@ -313,52 +266,51 @@ export abstract class BaseGiven<
|
|
|
313
266
|
|
|
314
267
|
const givenArtifactory = (fPath: string, value: unknown) =>
|
|
315
268
|
artifactory(`given-${key}/${fPath}`, value);
|
|
316
|
-
try {
|
|
317
|
-
// tLog(`\n Given this.store`, this.store);
|
|
318
269
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
270
|
+
const beforeEachProxy = new Proxy(pm, {
|
|
271
|
+
get(target, prop, receiver) {
|
|
272
|
+
if (prop === "writeFileSync") {
|
|
273
|
+
return (fp, contents) =>
|
|
274
|
+
target[prop](
|
|
275
|
+
`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`,
|
|
276
|
+
contents
|
|
277
|
+
);
|
|
278
|
+
}
|
|
328
279
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
280
|
+
if (prop === "customScreenShot") {
|
|
281
|
+
return (opts, p) =>
|
|
282
|
+
target.customScreenShot(
|
|
283
|
+
{
|
|
284
|
+
...opts,
|
|
285
|
+
path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}`,
|
|
286
|
+
},
|
|
287
|
+
p
|
|
288
|
+
);
|
|
289
|
+
}
|
|
339
290
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
291
|
+
if (prop === "screencast") {
|
|
292
|
+
return (opts, p) =>
|
|
293
|
+
target.screencast(
|
|
294
|
+
{
|
|
295
|
+
...opts,
|
|
296
|
+
path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}`,
|
|
297
|
+
},
|
|
298
|
+
p
|
|
299
|
+
);
|
|
300
|
+
}
|
|
350
301
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
302
|
+
/* @ts-ignore:next-line */
|
|
303
|
+
return Reflect.get(...arguments);
|
|
304
|
+
},
|
|
305
|
+
});
|
|
355
306
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
307
|
+
this.uberCatcher((e) => {
|
|
308
|
+
console.error(e);
|
|
309
|
+
this.error = e.error;
|
|
310
|
+
tLog(e.stack);
|
|
311
|
+
});
|
|
361
312
|
|
|
313
|
+
try {
|
|
362
314
|
this.store = await this.givenThat(
|
|
363
315
|
subject,
|
|
364
316
|
testResourceConfiguration,
|
|
@@ -367,6 +319,13 @@ export abstract class BaseGiven<
|
|
|
367
319
|
this.initialValues,
|
|
368
320
|
beforeEachProxy
|
|
369
321
|
);
|
|
322
|
+
} catch (e) {
|
|
323
|
+
this.error = e;
|
|
324
|
+
throw e;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
try {
|
|
328
|
+
// tLog(`\n Given this.store`, this.store);
|
|
370
329
|
|
|
371
330
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
372
331
|
await whenStep.test(
|
|
@@ -389,12 +348,10 @@ export abstract class BaseGiven<
|
|
|
389
348
|
tester(t);
|
|
390
349
|
}
|
|
391
350
|
} catch (e) {
|
|
392
|
-
|
|
393
|
-
this.
|
|
351
|
+
// this.error = e;
|
|
352
|
+
this.failed = true;
|
|
394
353
|
tLog(e.stack);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
// throw e;
|
|
354
|
+
throw e;
|
|
398
355
|
} finally {
|
|
399
356
|
try {
|
|
400
357
|
const afterEachProxy = new Proxy(pm, {
|
|
@@ -431,24 +388,17 @@ export abstract class BaseGiven<
|
|
|
431
388
|
afterEachProxy
|
|
432
389
|
);
|
|
433
390
|
} catch (e) {
|
|
434
|
-
|
|
391
|
+
this.failed = e;
|
|
392
|
+
throw e;
|
|
393
|
+
// console.error("afterEach failed!", e);
|
|
394
|
+
// this.error = e.message;
|
|
435
395
|
}
|
|
436
396
|
}
|
|
437
397
|
return this.store;
|
|
438
398
|
}
|
|
439
399
|
}
|
|
440
400
|
|
|
441
|
-
export abstract class BaseWhen<
|
|
442
|
-
I extends Ibdd_in<
|
|
443
|
-
unknown,
|
|
444
|
-
unknown,
|
|
445
|
-
unknown,
|
|
446
|
-
unknown,
|
|
447
|
-
unknown,
|
|
448
|
-
unknown,
|
|
449
|
-
unknown
|
|
450
|
-
>
|
|
451
|
-
> {
|
|
401
|
+
export abstract class BaseWhen<I extends IT> {
|
|
452
402
|
public name: string;
|
|
453
403
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
454
404
|
error: boolean;
|
|
@@ -462,7 +412,7 @@ export abstract class BaseWhen<
|
|
|
462
412
|
store: I["istore"],
|
|
463
413
|
whenCB: (x: I["iselection"]) => I["then"],
|
|
464
414
|
testResource,
|
|
465
|
-
pm:
|
|
415
|
+
pm: IPM
|
|
466
416
|
): Promise<any>;
|
|
467
417
|
|
|
468
418
|
toObj() {
|
|
@@ -476,12 +426,11 @@ export abstract class BaseWhen<
|
|
|
476
426
|
store: I["istore"],
|
|
477
427
|
testResourceConfiguration,
|
|
478
428
|
tLog: ITLog,
|
|
479
|
-
pm:
|
|
429
|
+
pm: IPM,
|
|
480
430
|
filepath: string
|
|
481
431
|
) {
|
|
482
432
|
tLog(" When:", this.name);
|
|
483
433
|
|
|
484
|
-
const name = this.name;
|
|
485
434
|
const andWhenProxy = new Proxy(pm, {
|
|
486
435
|
get(target, prop, receiver) {
|
|
487
436
|
if (prop === "customScreenShot") {
|
|
@@ -527,24 +476,16 @@ export abstract class BaseWhen<
|
|
|
527
476
|
}
|
|
528
477
|
}
|
|
529
478
|
|
|
530
|
-
export abstract class BaseThen<
|
|
531
|
-
I extends Ibdd_in<
|
|
532
|
-
unknown,
|
|
533
|
-
unknown,
|
|
534
|
-
unknown,
|
|
535
|
-
unknown,
|
|
536
|
-
unknown,
|
|
537
|
-
unknown,
|
|
538
|
-
unknown
|
|
539
|
-
>
|
|
540
|
-
> {
|
|
479
|
+
export abstract class BaseThen<I extends IT> {
|
|
541
480
|
public name: string;
|
|
542
481
|
thenCB: (storeState: I["iselection"]) => I["then"];
|
|
482
|
+
go: (storeState: I["iselection"]) => I["then"];
|
|
543
483
|
error: boolean;
|
|
544
484
|
|
|
545
485
|
constructor(name: string, thenCB: (val: I["iselection"]) => I["then"]) {
|
|
546
486
|
this.name = name;
|
|
547
487
|
this.thenCB = thenCB;
|
|
488
|
+
|
|
548
489
|
this.error = false;
|
|
549
490
|
}
|
|
550
491
|
|
|
@@ -557,19 +498,31 @@ export abstract class BaseThen<
|
|
|
557
498
|
|
|
558
499
|
abstract butThen(
|
|
559
500
|
store: I["istore"],
|
|
560
|
-
thenCB,
|
|
501
|
+
thenCB: (s: I["iselection"]) => I["isubject"],
|
|
561
502
|
testResourceConfiguration: ITTestResourceConfiguration,
|
|
562
|
-
pm:
|
|
503
|
+
pm: IPM,
|
|
504
|
+
...args: any[]
|
|
563
505
|
): Promise<I["iselection"]>;
|
|
564
506
|
|
|
565
507
|
async test(
|
|
566
508
|
store: I["istore"],
|
|
567
509
|
testResourceConfiguration,
|
|
568
510
|
tLog: ITLog,
|
|
569
|
-
pm:
|
|
511
|
+
pm: IPM,
|
|
570
512
|
filepath: string
|
|
571
513
|
): Promise<I["then"] | undefined> {
|
|
572
|
-
|
|
514
|
+
this.go = async (s: I["iselection"]) => {
|
|
515
|
+
tLog(" Then!!!:", this.name);
|
|
516
|
+
|
|
517
|
+
try {
|
|
518
|
+
await this.thenCB(s);
|
|
519
|
+
} catch (e) {
|
|
520
|
+
console.log("test failed 1", e);
|
|
521
|
+
this.error = e;
|
|
522
|
+
throw e;
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
|
|
573
526
|
try {
|
|
574
527
|
const butThenProxy = new Proxy(pm, {
|
|
575
528
|
get(target, prop, receiver) {
|
|
@@ -596,77 +549,74 @@ export abstract class BaseThen<
|
|
|
596
549
|
|
|
597
550
|
return this.butThen(
|
|
598
551
|
store,
|
|
599
|
-
this.
|
|
552
|
+
this.go,
|
|
600
553
|
testResourceConfiguration,
|
|
601
554
|
butThenProxy
|
|
602
555
|
).catch((e) => {
|
|
603
|
-
this.error =
|
|
556
|
+
this.error = e;
|
|
604
557
|
throw e;
|
|
605
558
|
});
|
|
606
559
|
} catch (e) {
|
|
607
|
-
console.log("test failed", e);
|
|
608
|
-
this.error = e
|
|
560
|
+
console.log("test failed 2", e);
|
|
561
|
+
this.error = e;
|
|
609
562
|
throw e;
|
|
610
563
|
}
|
|
611
564
|
}
|
|
565
|
+
|
|
566
|
+
check() {}
|
|
612
567
|
}
|
|
613
568
|
|
|
614
|
-
export abstract class BaseCheck<
|
|
615
|
-
|
|
616
|
-
unknown,
|
|
617
|
-
unknown,
|
|
618
|
-
unknown,
|
|
619
|
-
unknown,
|
|
620
|
-
unknown,
|
|
621
|
-
unknown,
|
|
622
|
-
unknown
|
|
623
|
-
>,
|
|
624
|
-
O extends Ibdd_out<
|
|
625
|
-
Record<string, any>,
|
|
626
|
-
Record<string, any>,
|
|
627
|
-
Record<string, any>,
|
|
628
|
-
Record<string, any>,
|
|
629
|
-
Record<string, any>
|
|
630
|
-
>
|
|
631
|
-
> {
|
|
569
|
+
export abstract class BaseCheck<I extends IT = IT> {
|
|
570
|
+
key: string;
|
|
632
571
|
name: string;
|
|
633
572
|
features: string[];
|
|
634
|
-
checkCB: (
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
thens: {
|
|
639
|
-
[K in keyof O["thens"]]: (p, tc) => BaseThen<I>;
|
|
640
|
-
};
|
|
573
|
+
checkCB: (store: I["istore"], pm: IPM) => any;
|
|
574
|
+
initialValues: any;
|
|
575
|
+
store: I["istore"];
|
|
576
|
+
checker: any;
|
|
641
577
|
|
|
642
578
|
constructor(
|
|
643
579
|
name: string,
|
|
644
580
|
features: string[],
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
581
|
+
checker: (store: I["istore"], pm: IPM) => any,
|
|
582
|
+
x: any,
|
|
583
|
+
checkCB: any
|
|
648
584
|
) {
|
|
649
585
|
this.name = name;
|
|
650
586
|
this.features = features;
|
|
651
587
|
this.checkCB = checkCB;
|
|
652
|
-
this.
|
|
653
|
-
this.thens = thens;
|
|
588
|
+
this.checker = checker;
|
|
654
589
|
}
|
|
655
590
|
|
|
656
591
|
abstract checkThat(
|
|
657
592
|
subject: I["isubject"],
|
|
658
593
|
testResourceConfiguration,
|
|
659
594
|
artifactory: ITestArtifactory,
|
|
660
|
-
|
|
595
|
+
initializer,
|
|
596
|
+
initialValues,
|
|
597
|
+
pm: IPM
|
|
661
598
|
): Promise<I["istore"]>;
|
|
662
599
|
|
|
600
|
+
toObj() {
|
|
601
|
+
return {
|
|
602
|
+
key: this.key,
|
|
603
|
+
name: this.name,
|
|
604
|
+
functionAsString: this.checkCB.toString(),
|
|
605
|
+
features: this.features,
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
|
|
663
609
|
async afterEach(
|
|
664
610
|
store: I["istore"],
|
|
665
611
|
key: string,
|
|
666
|
-
|
|
667
|
-
pm:
|
|
612
|
+
artifactory: ITestArtifactory,
|
|
613
|
+
pm: IPM
|
|
668
614
|
): Promise<unknown> {
|
|
669
|
-
return;
|
|
615
|
+
return store;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
beforeAll(store: I["istore"]) {
|
|
619
|
+
return store;
|
|
670
620
|
}
|
|
671
621
|
|
|
672
622
|
async check(
|
|
@@ -676,43 +626,21 @@ export abstract class BaseCheck<
|
|
|
676
626
|
tester,
|
|
677
627
|
artifactory: ITestArtifactory,
|
|
678
628
|
tLog: ITLog,
|
|
679
|
-
pm:
|
|
629
|
+
pm: IPM
|
|
680
630
|
) {
|
|
631
|
+
this.key = key;
|
|
681
632
|
tLog(`\n Check: ${this.name}`);
|
|
682
|
-
|
|
633
|
+
this.store = await this.checkThat(
|
|
683
634
|
subject,
|
|
684
635
|
testResourceConfiguration,
|
|
685
636
|
artifactory,
|
|
637
|
+
this.checkCB,
|
|
638
|
+
this.initialValues,
|
|
686
639
|
pm
|
|
687
640
|
);
|
|
688
|
-
await this.checkCB(
|
|
689
|
-
Object.entries(this.whens).reduce((a, [key, when]) => {
|
|
690
|
-
a[key] = async (payload) => {
|
|
691
|
-
return await when(payload, testResourceConfiguration).test(
|
|
692
|
-
store,
|
|
693
|
-
testResourceConfiguration,
|
|
694
|
-
tLog,
|
|
695
|
-
pm,
|
|
696
|
-
"x"
|
|
697
|
-
);
|
|
698
|
-
};
|
|
699
|
-
return a;
|
|
700
|
-
}, {}),
|
|
701
|
-
Object.entries(this.thens).reduce((a, [key, then]) => {
|
|
702
|
-
a[key] = async (payload) => {
|
|
703
|
-
const t = await then(payload, testResourceConfiguration).test(
|
|
704
|
-
store,
|
|
705
|
-
testResourceConfiguration,
|
|
706
|
-
tLog,
|
|
707
|
-
pm
|
|
708
|
-
);
|
|
709
|
-
tester(t);
|
|
710
|
-
};
|
|
711
|
-
return a;
|
|
712
|
-
}, {})
|
|
713
|
-
);
|
|
714
641
|
|
|
715
|
-
await this.
|
|
642
|
+
await this.checker(this.store, pm);
|
|
643
|
+
|
|
716
644
|
return;
|
|
717
645
|
}
|
|
718
646
|
}
|