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
|
@@ -7,9 +7,9 @@ const path_1 = __importDefault(require("path"));
|
|
|
7
7
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
8
8
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
9
9
|
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
10
|
-
exports.default = (config, entryPoints) => {
|
|
11
|
-
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web",
|
|
12
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir:
|
|
10
|
+
exports.default = (config, entryPoints, testName) => {
|
|
11
|
+
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web", testName);
|
|
12
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
13
13
|
react: path_1.default.resolve("./node_modules/react"),
|
|
14
14
|
}, metafile: true, external: [
|
|
15
15
|
"path",
|
|
@@ -34,7 +34,10 @@ exports.default = (config, entryPoints) => {
|
|
|
34
34
|
inputFilesPluginFactory,
|
|
35
35
|
{
|
|
36
36
|
name: "rebuild-notify",
|
|
37
|
-
setup(build) {
|
|
37
|
+
setup: (build) => {
|
|
38
|
+
build.onStart(() => {
|
|
39
|
+
console.log(`> web build starting...`);
|
|
40
|
+
});
|
|
38
41
|
build.onEnd((result) => {
|
|
39
42
|
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
40
43
|
if (result.errors.length > 0) {
|
|
@@ -45,6 +48,6 @@ exports.default = (config, entryPoints) => {
|
|
|
45
48
|
});
|
|
46
49
|
},
|
|
47
50
|
},
|
|
48
|
-
...(config.
|
|
51
|
+
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
49
52
|
] });
|
|
50
53
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ClassicalComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
class ClassicalComponent extends react_1.default.Component {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.state = {
|
|
12
|
+
count: 0,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (react_1.default.createElement("div", { style: { border: "3px solid black" } },
|
|
17
|
+
react_1.default.createElement("h1", { id: "theHeader" }, "Hello Marcus"),
|
|
18
|
+
react_1.default.createElement("pre", { id: "theProps" }, JSON.stringify(this.props)),
|
|
19
|
+
react_1.default.createElement("p", null,
|
|
20
|
+
"foo: ",
|
|
21
|
+
this.props.foo),
|
|
22
|
+
react_1.default.createElement("pre", { id: "theStat" }, JSON.stringify(this.state)),
|
|
23
|
+
react_1.default.createElement("p", null,
|
|
24
|
+
"count: ",
|
|
25
|
+
this.state.count,
|
|
26
|
+
" times"),
|
|
27
|
+
react_1.default.createElement("button", { id: "theButton", onClick: async () => {
|
|
28
|
+
this.setState({ count: this.state.count + 1 });
|
|
29
|
+
} }, "Click")));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ClassicalComponent = ClassicalComponent;
|
|
33
|
+
exports.default = ClassicalComponent;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.specification = void 0;
|
|
4
|
+
const specification = (Suite, Given, When, Then) => {
|
|
5
|
+
return [
|
|
6
|
+
Suite.Default("a classical react component", {
|
|
7
|
+
test0: Given.AnEmptyState([`I click 4 times and the count is 3`], [
|
|
8
|
+
When.IClickTheButton(),
|
|
9
|
+
When.IClickTheButton(),
|
|
10
|
+
When.IClickTheButton(),
|
|
11
|
+
When.IClickTheHeader(),
|
|
12
|
+
// When.IClickTheButton(),
|
|
13
|
+
], [
|
|
14
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
15
|
+
Then.TheStatusIs({ count: 3 }),
|
|
16
|
+
]),
|
|
17
|
+
test1: Given.AnEmptyState([`Count is 1 by default`], [When.IClickTheButton()], [
|
|
18
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
19
|
+
Then.TheStatusIs({ count: 1 }),
|
|
20
|
+
]),
|
|
21
|
+
test2: Given.AnEmptyState([`0`], [
|
|
22
|
+
When.IClickTheButton(),
|
|
23
|
+
When.IClickTheButton(),
|
|
24
|
+
When.IClickTheButton(),
|
|
25
|
+
When.IClickTheButton(),
|
|
26
|
+
When.IClickTheButton(),
|
|
27
|
+
When.IClickTheButton(),
|
|
28
|
+
When.IClickTheButton(),
|
|
29
|
+
When.IClickTheButton(),
|
|
30
|
+
When.IClickTheButton(),
|
|
31
|
+
], [Then.TheStatusIs({ count: 9 })]),
|
|
32
|
+
test3: Given.AnEmptyState([`0`], [When.IClickTheButton(), When.IClickTheButton()], [Then.TheStatusIs({ count: 2 })]),
|
|
33
|
+
}, []),
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
exports.specification = specification;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Init_1 = __importDefault(require("./Init"));
|
|
7
|
+
console.log("Initializing a testeranto project");
|
|
8
|
+
(0, Init_1.default)();
|
|
9
|
+
console.log("testeranto project initialized");
|
|
@@ -7,7 +7,7 @@ class BaseSuite {
|
|
|
7
7
|
this.index = index;
|
|
8
8
|
this.givens = givens;
|
|
9
9
|
this.checks = checks;
|
|
10
|
-
this.fails =
|
|
10
|
+
this.fails = 0;
|
|
11
11
|
}
|
|
12
12
|
features() {
|
|
13
13
|
const features = Object.keys(this.givens)
|
|
@@ -16,18 +16,17 @@ class BaseSuite {
|
|
|
16
16
|
.filter((value, index, array) => {
|
|
17
17
|
return array.indexOf(value) === index;
|
|
18
18
|
});
|
|
19
|
-
// .reduce((mm, lm) => {
|
|
20
|
-
// mm[lm] = lm;
|
|
21
|
-
// return mm;
|
|
22
|
-
// }, {});
|
|
23
19
|
return features || [];
|
|
24
20
|
}
|
|
25
21
|
toObj() {
|
|
26
22
|
const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
|
|
23
|
+
const checks = Object.keys(this.checks).map((k) => this.checks[k].toObj());
|
|
27
24
|
return {
|
|
28
25
|
name: this.name,
|
|
29
26
|
givens,
|
|
27
|
+
checks,
|
|
30
28
|
fails: this.fails,
|
|
29
|
+
failed: this.failed,
|
|
31
30
|
features: this.features(),
|
|
32
31
|
};
|
|
33
32
|
}
|
|
@@ -35,46 +34,50 @@ class BaseSuite {
|
|
|
35
34
|
return new Promise((res) => res(s));
|
|
36
35
|
}
|
|
37
36
|
assertThat(t) {
|
|
38
|
-
return t;
|
|
37
|
+
return !!t;
|
|
39
38
|
}
|
|
40
39
|
afterAll(store, artifactory, pm) {
|
|
41
40
|
return store;
|
|
42
41
|
}
|
|
43
42
|
async run(input, testResourceConfiguration, artifactory, tLog, pm) {
|
|
44
43
|
this.testResourceConfiguration = testResourceConfiguration;
|
|
45
|
-
tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
44
|
+
// tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
46
45
|
const suiteArtifactory = (fPath, value) => artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
|
|
47
46
|
// console.log("\nSuite:", this.index, this.name);
|
|
48
47
|
tLog("\nSuite:", this.index, this.name);
|
|
49
48
|
const sNdx = this.index;
|
|
50
49
|
const sName = this.name;
|
|
50
|
+
const beforeAllProxy = new Proxy(pm, {
|
|
51
|
+
get(target, prop, receiver) {
|
|
52
|
+
if (prop === "customScreenShot") {
|
|
53
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
|
|
54
|
+
// path: `${filepath}/${opts.path}`,
|
|
55
|
+
path: `suite-${sNdx}/beforeAll/${opts.path}` }), p);
|
|
56
|
+
}
|
|
57
|
+
if (prop === "writeFileSync") {
|
|
58
|
+
return (fp, contents) => target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
|
|
59
|
+
}
|
|
60
|
+
/* @ts-ignore:next-line */
|
|
61
|
+
return Reflect.get(...arguments);
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
const subject = await this.setup(input, suiteArtifactory, testResourceConfiguration, beforeAllProxy);
|
|
51
65
|
for (const [gKey, g] of Object.entries(this.givens)) {
|
|
52
|
-
// console.log("gKey", gKey);
|
|
53
|
-
const beforeAllProxy = new Proxy(pm, {
|
|
54
|
-
get(target, prop, receiver) {
|
|
55
|
-
if (prop === "customScreenShot") {
|
|
56
|
-
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
|
|
57
|
-
// path: `${filepath}/${opts.path}`,
|
|
58
|
-
path: `suite-${sNdx}/beforeAll/${opts.path}` }), p);
|
|
59
|
-
}
|
|
60
|
-
if (prop === "writeFileSync") {
|
|
61
|
-
return (fp, contents) => target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
|
|
62
|
-
}
|
|
63
|
-
/* @ts-ignore:next-line */
|
|
64
|
-
return Reflect.get(...arguments);
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
const subject = await this.setup(input, suiteArtifactory, testResourceConfiguration, beforeAllProxy);
|
|
68
66
|
const giver = this.givens[gKey];
|
|
69
67
|
try {
|
|
70
68
|
this.store = await giver.give(subject, gKey, testResourceConfiguration, this.assertThat, suiteArtifactory, tLog, pm, sNdx);
|
|
71
69
|
}
|
|
72
70
|
catch (e) {
|
|
73
|
-
|
|
74
|
-
this.fails.
|
|
71
|
+
this.failed = true;
|
|
72
|
+
this.fails = this.fails + 1;
|
|
73
|
+
// console.error(e);
|
|
74
|
+
// this.fails.push(giver);
|
|
75
75
|
// return this;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
for (const [ndx, thater] of this.checks.entries()) {
|
|
79
|
+
await thater.check(subject, thater.name, testResourceConfiguration, this.assertThat, suiteArtifactory, tLog, pm);
|
|
80
|
+
}
|
|
78
81
|
try {
|
|
79
82
|
this.afterAll(this.store, artifactory,
|
|
80
83
|
// afterAllProxy
|
|
@@ -85,17 +88,6 @@ class BaseSuite {
|
|
|
85
88
|
// this.fails.push(this);
|
|
86
89
|
// return this;
|
|
87
90
|
}
|
|
88
|
-
// for (const [ndx, thater] of this.checks.entries()) {
|
|
89
|
-
// await thater.check(
|
|
90
|
-
// subject,
|
|
91
|
-
// thater.name,
|
|
92
|
-
// testResourceConfiguration,
|
|
93
|
-
// this.assertThat,
|
|
94
|
-
// suiteArtifactory,
|
|
95
|
-
// tLog,
|
|
96
|
-
// pm
|
|
97
|
-
// );
|
|
98
|
-
// }
|
|
99
91
|
// @TODO fix me
|
|
100
92
|
// for (const k of Object.keys(this.givens)) {
|
|
101
93
|
// const giver = this.givens[k];
|
|
@@ -113,9 +105,7 @@ class BaseSuite {
|
|
|
113
105
|
}
|
|
114
106
|
exports.BaseSuite = BaseSuite;
|
|
115
107
|
class BaseGiven {
|
|
116
|
-
constructor(name, features, whens, thens, givenCB, initialValues
|
|
117
|
-
// key: string
|
|
118
|
-
) {
|
|
108
|
+
constructor(name, features, whens, thens, givenCB, initialValues) {
|
|
119
109
|
this.name = name;
|
|
120
110
|
this.features = features;
|
|
121
111
|
this.whens = whens;
|
|
@@ -123,10 +113,7 @@ class BaseGiven {
|
|
|
123
113
|
this.givenCB = givenCB;
|
|
124
114
|
this.initialValues = initialValues;
|
|
125
115
|
}
|
|
126
|
-
beforeAll(store
|
|
127
|
-
// artifactory: ITestArtifactory
|
|
128
|
-
// subject,
|
|
129
|
-
initializer, artifactory, testResource, initialValues, pm) {
|
|
116
|
+
beforeAll(store) {
|
|
130
117
|
return store;
|
|
131
118
|
}
|
|
132
119
|
toObj() {
|
|
@@ -136,7 +123,7 @@ class BaseGiven {
|
|
|
136
123
|
whens: this.whens.map((w) => w.toObj()),
|
|
137
124
|
thens: this.thens.map((t) => t.toObj()),
|
|
138
125
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
139
|
-
|
|
126
|
+
failed: this.failed,
|
|
140
127
|
features: this.features,
|
|
141
128
|
};
|
|
142
129
|
}
|
|
@@ -148,29 +135,35 @@ class BaseGiven {
|
|
|
148
135
|
tLog(`\n ${this.key}`);
|
|
149
136
|
tLog(`\n Given: ${this.name}`);
|
|
150
137
|
const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
|
|
138
|
+
const beforeEachProxy = new Proxy(pm, {
|
|
139
|
+
get(target, prop, receiver) {
|
|
140
|
+
if (prop === "writeFileSync") {
|
|
141
|
+
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`, contents);
|
|
142
|
+
}
|
|
143
|
+
if (prop === "customScreenShot") {
|
|
144
|
+
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
145
|
+
}
|
|
146
|
+
if (prop === "screencast") {
|
|
147
|
+
return (opts, p) => target.screencast(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
148
|
+
}
|
|
149
|
+
/* @ts-ignore:next-line */
|
|
150
|
+
return Reflect.get(...arguments);
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
this.uberCatcher((e) => {
|
|
154
|
+
console.error(e);
|
|
155
|
+
this.error = e.error;
|
|
156
|
+
tLog(e.stack);
|
|
157
|
+
});
|
|
151
158
|
try {
|
|
152
|
-
// tLog(`\n Given this.store`, this.store);
|
|
153
|
-
const beforeEachProxy = new Proxy(pm, {
|
|
154
|
-
get(target, prop, receiver) {
|
|
155
|
-
if (prop === "writeFileSync") {
|
|
156
|
-
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`, contents);
|
|
157
|
-
}
|
|
158
|
-
if (prop === "customScreenShot") {
|
|
159
|
-
return (opts, p) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
160
|
-
}
|
|
161
|
-
if (prop === "screencast") {
|
|
162
|
-
return (opts, p) => target.screencast(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }), p);
|
|
163
|
-
}
|
|
164
|
-
/* @ts-ignore:next-line */
|
|
165
|
-
return Reflect.get(...arguments);
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
this.uberCatcher((e) => {
|
|
169
|
-
console.error(e);
|
|
170
|
-
this.error = e.error;
|
|
171
|
-
tLog(e.stack);
|
|
172
|
-
});
|
|
173
159
|
this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, beforeEachProxy);
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
this.error = e;
|
|
163
|
+
throw e;
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
// tLog(`\n Given this.store`, this.store);
|
|
174
167
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
175
168
|
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
|
|
176
169
|
}
|
|
@@ -180,11 +173,10 @@ class BaseGiven {
|
|
|
180
173
|
}
|
|
181
174
|
}
|
|
182
175
|
catch (e) {
|
|
183
|
-
|
|
184
|
-
this.
|
|
176
|
+
// this.error = e;
|
|
177
|
+
this.failed = true;
|
|
185
178
|
tLog(e.stack);
|
|
186
|
-
|
|
187
|
-
// throw e;
|
|
179
|
+
throw e;
|
|
188
180
|
}
|
|
189
181
|
finally {
|
|
190
182
|
try {
|
|
@@ -205,7 +197,10 @@ class BaseGiven {
|
|
|
205
197
|
afterEachProxy);
|
|
206
198
|
}
|
|
207
199
|
catch (e) {
|
|
208
|
-
|
|
200
|
+
this.failed = e;
|
|
201
|
+
throw e;
|
|
202
|
+
// console.error("afterEach failed!", e);
|
|
203
|
+
// this.error = e.message;
|
|
209
204
|
}
|
|
210
205
|
}
|
|
211
206
|
return this.store;
|
|
@@ -225,7 +220,6 @@ class BaseWhen {
|
|
|
225
220
|
}
|
|
226
221
|
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
227
222
|
tLog(" When:", this.name);
|
|
228
|
-
const name = this.name;
|
|
229
223
|
const andWhenProxy = new Proxy(pm, {
|
|
230
224
|
get(target, prop, receiver) {
|
|
231
225
|
if (prop === "customScreenShot") {
|
|
@@ -269,7 +263,17 @@ class BaseThen {
|
|
|
269
263
|
};
|
|
270
264
|
}
|
|
271
265
|
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
272
|
-
|
|
266
|
+
this.go = async (s) => {
|
|
267
|
+
tLog(" Then!!!:", this.name);
|
|
268
|
+
try {
|
|
269
|
+
await this.thenCB(s);
|
|
270
|
+
}
|
|
271
|
+
catch (e) {
|
|
272
|
+
console.log("test failed 1", e);
|
|
273
|
+
this.error = e;
|
|
274
|
+
throw e;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
273
277
|
try {
|
|
274
278
|
const butThenProxy = new Proxy(pm, {
|
|
275
279
|
get(target, prop, receiver) {
|
|
@@ -283,46 +287,46 @@ class BaseThen {
|
|
|
283
287
|
return Reflect.get(...arguments);
|
|
284
288
|
},
|
|
285
289
|
});
|
|
286
|
-
return this.butThen(store, this.
|
|
287
|
-
this.error =
|
|
290
|
+
return this.butThen(store, this.go, testResourceConfiguration, butThenProxy).catch((e) => {
|
|
291
|
+
this.error = e;
|
|
288
292
|
throw e;
|
|
289
293
|
});
|
|
290
294
|
}
|
|
291
295
|
catch (e) {
|
|
292
|
-
console.log("test failed", e);
|
|
293
|
-
this.error = e
|
|
296
|
+
console.log("test failed 2", e);
|
|
297
|
+
this.error = e;
|
|
294
298
|
throw e;
|
|
295
299
|
}
|
|
296
300
|
}
|
|
301
|
+
check() { }
|
|
297
302
|
}
|
|
298
303
|
exports.BaseThen = BaseThen;
|
|
299
304
|
class BaseCheck {
|
|
300
|
-
constructor(name, features,
|
|
305
|
+
constructor(name, features, checker, x, checkCB) {
|
|
301
306
|
this.name = name;
|
|
302
307
|
this.features = features;
|
|
303
308
|
this.checkCB = checkCB;
|
|
304
|
-
this.
|
|
305
|
-
this.thens = thens;
|
|
309
|
+
this.checker = checker;
|
|
306
310
|
}
|
|
307
|
-
|
|
308
|
-
return
|
|
311
|
+
toObj() {
|
|
312
|
+
return {
|
|
313
|
+
key: this.key,
|
|
314
|
+
name: this.name,
|
|
315
|
+
functionAsString: this.checkCB.toString(),
|
|
316
|
+
features: this.features,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
async afterEach(store, key, artifactory, pm) {
|
|
320
|
+
return store;
|
|
321
|
+
}
|
|
322
|
+
beforeAll(store) {
|
|
323
|
+
return store;
|
|
309
324
|
}
|
|
310
325
|
async check(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm) {
|
|
326
|
+
this.key = key;
|
|
311
327
|
tLog(`\n Check: ${this.name}`);
|
|
312
|
-
|
|
313
|
-
await this.
|
|
314
|
-
a[key] = async (payload) => {
|
|
315
|
-
return await when(payload, testResourceConfiguration).test(store, testResourceConfiguration, tLog, pm, "x");
|
|
316
|
-
};
|
|
317
|
-
return a;
|
|
318
|
-
}, {}), Object.entries(this.thens).reduce((a, [key, then]) => {
|
|
319
|
-
a[key] = async (payload) => {
|
|
320
|
-
const t = await then(payload, testResourceConfiguration).test(store, testResourceConfiguration, tLog, pm);
|
|
321
|
-
tester(t);
|
|
322
|
-
};
|
|
323
|
-
return a;
|
|
324
|
-
}, {}));
|
|
325
|
-
await this.afterEach(store, key, () => { }, pm);
|
|
328
|
+
this.store = await this.checkThat(subject, testResourceConfiguration, artifactory, this.checkCB, this.initialValues, pm);
|
|
329
|
+
await this.checker(this.store, pm);
|
|
326
330
|
return;
|
|
327
331
|
}
|
|
328
332
|
}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseBuilder = void 0;
|
|
4
4
|
class BaseBuilder {
|
|
5
5
|
constructor(input, suitesOverrides, givenOverides, whenOverides, thenOverides, checkOverides, testResourceRequirement, testSpecification) {
|
|
6
|
-
this.input = input;
|
|
7
6
|
this.artifacts = [];
|
|
8
7
|
this.artifacts = [];
|
|
9
8
|
this.testResourceRequirement = testResourceRequirement;
|
|
@@ -29,23 +28,22 @@ class BaseBuilder {
|
|
|
29
28
|
},
|
|
30
29
|
runner,
|
|
31
30
|
receiveTestResourceConfig: async function (puppetMaster) {
|
|
31
|
+
const start = await puppetMaster.start();
|
|
32
32
|
const logFilePath = "log.txt";
|
|
33
33
|
const access = await puppetMaster.createWriteStream(logFilePath);
|
|
34
|
-
const tLog = (...l) => {
|
|
35
|
-
puppetMaster.write(access, `${l.toString()}\n`);
|
|
34
|
+
const tLog = async (...l) => {
|
|
35
|
+
const x = await puppetMaster.write(access, `${l.toString()}\n`);
|
|
36
|
+
// console.log("x", x);
|
|
36
37
|
};
|
|
37
38
|
const suiteDone = await runner(puppetMaster, tLog);
|
|
38
|
-
const logPromise = new Promise((res, rej) => {
|
|
39
|
-
puppetMaster.end(access);
|
|
39
|
+
const logPromise = new Promise(async (res, rej) => {
|
|
40
|
+
await puppetMaster.end(access);
|
|
40
41
|
res(true);
|
|
41
42
|
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const o = this.toObj();
|
|
47
|
-
puppetMaster.writeFileSync(`littleBoard.html`, `
|
|
48
|
-
<!DOCTYPE html>
|
|
43
|
+
const fails = suiteDone.fails;
|
|
44
|
+
const b = await puppetMaster.writeFileSync(`bdd_errors.txt`, fails.toString());
|
|
45
|
+
await puppetMaster.writeFileSync(`littleBoard.html`, `
|
|
46
|
+
<!DOCTYPE html>
|
|
49
47
|
<html lang="en">
|
|
50
48
|
|
|
51
49
|
<head>
|
|
@@ -55,19 +53,19 @@ class BaseBuilder {
|
|
|
55
53
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
56
54
|
<meta name="author" content="" />
|
|
57
55
|
|
|
58
|
-
<link rel="stylesheet" href="/kokomoBay/
|
|
59
|
-
<script src="/kokomoBay/
|
|
56
|
+
<link rel="stylesheet" href="/kokomoBay/testeranto/TestReport.css" />
|
|
57
|
+
<script src="/kokomoBay/testeranto/TestReport.js"></script>
|
|
60
58
|
|
|
61
59
|
</head>
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</body>
|
|
61
|
+
<body>
|
|
62
|
+
<div id="root"/>
|
|
63
|
+
</body>
|
|
67
64
|
`);
|
|
68
|
-
puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
|
|
65
|
+
await puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
|
|
69
66
|
return {
|
|
70
|
-
failed:
|
|
67
|
+
failed: fails > 0,
|
|
68
|
+
fails,
|
|
71
69
|
artifacts: this.artifacts || [],
|
|
72
70
|
logPromise,
|
|
73
71
|
features: suiteDone.features(),
|
|
@@ -76,6 +74,12 @@ class BaseBuilder {
|
|
|
76
74
|
};
|
|
77
75
|
});
|
|
78
76
|
}
|
|
77
|
+
// testsJson() {
|
|
78
|
+
// puppetMaster.writeFileSync(
|
|
79
|
+
// `tests.json`,
|
|
80
|
+
// JSON.stringify({ features: suiteDone.features() }, null, 2)
|
|
81
|
+
// );
|
|
82
|
+
// }
|
|
79
83
|
Specs() {
|
|
80
84
|
return this.specs;
|
|
81
85
|
}
|
|
@@ -11,8 +11,11 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
|
|
|
11
11
|
return a;
|
|
12
12
|
}, {});
|
|
13
13
|
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
14
|
-
a[key] = (features, whens, thens
|
|
15
|
-
|
|
14
|
+
a[key] = (features, whens, thens) => {
|
|
15
|
+
// console.log("givEn", givEn.toString());
|
|
16
|
+
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key]
|
|
17
|
+
// givEn
|
|
18
|
+
);
|
|
16
19
|
};
|
|
17
20
|
return a;
|
|
18
21
|
}, {});
|
|
@@ -28,9 +31,9 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
|
|
|
28
31
|
};
|
|
29
32
|
return a;
|
|
30
33
|
}, {});
|
|
31
|
-
const classyChecks = Object.entries(testImplementation.checks).reduce((a, [key,
|
|
32
|
-
a[key] = (
|
|
33
|
-
return new checkKlasser.prototype.constructor(
|
|
34
|
+
const classyChecks = Object.entries(testImplementation.checks).reduce((a, [key, chEck]) => {
|
|
35
|
+
a[key] = (name, features, checker) => {
|
|
36
|
+
return new checkKlasser.prototype.constructor(key, features, chEck, checker);
|
|
34
37
|
};
|
|
35
38
|
return a;
|
|
36
39
|
}, {});
|
|
@@ -8,16 +8,10 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
8
8
|
const fullTestInterface = (0, index_js_1.DefaultTestInterface)(testInterface);
|
|
9
9
|
super(testImplementation, testSpecification, input, class extends abstractBase_js_1.BaseSuite {
|
|
10
10
|
afterAll(store, artifactory, pm) {
|
|
11
|
-
return fullTestInterface.afterAll(store,
|
|
12
|
-
// (fPath: string, value: unknown) =>
|
|
13
|
-
// // TODO does not work?
|
|
14
|
-
// {
|
|
15
|
-
// artifactory(`afterAll4-${this.name}/${fPath}`, value);
|
|
16
|
-
// },
|
|
17
|
-
pm);
|
|
11
|
+
return fullTestInterface.afterAll(store, pm);
|
|
18
12
|
}
|
|
19
13
|
assertThat(t) {
|
|
20
|
-
fullTestInterface.assertThis(t);
|
|
14
|
+
return fullTestInterface.assertThis(t);
|
|
21
15
|
}
|
|
22
16
|
async setup(s, artifactory, tr, pm) {
|
|
23
17
|
return (fullTestInterface.beforeAll ||
|
|
@@ -31,15 +25,10 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
31
25
|
this.uberCatcher = uberCatcher;
|
|
32
26
|
}
|
|
33
27
|
async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
|
|
34
|
-
return fullTestInterface.beforeEach(subject, initializer,
|
|
35
|
-
// artifactory,
|
|
36
|
-
testResource, initialValues, pm);
|
|
28
|
+
return fullTestInterface.beforeEach(subject, initializer, testResource, initialValues, pm);
|
|
37
29
|
}
|
|
38
30
|
afterEach(store, key, artifactory, pm) {
|
|
39
|
-
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
40
|
-
// (fPath: string, value: unknown) =>
|
|
41
|
-
// artifactory(`after/${fPath}`, value),
|
|
42
|
-
pm)));
|
|
31
|
+
return new Promise((res) => res(fullTestInterface.afterEach(store, key, pm)));
|
|
43
32
|
}
|
|
44
33
|
}, class When extends abstractBase_js_1.BaseWhen {
|
|
45
34
|
async andWhen(store, whenCB, testResource, pm) {
|
|
@@ -49,20 +38,6 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
49
38
|
catch (e) {
|
|
50
39
|
throw e;
|
|
51
40
|
}
|
|
52
|
-
// return fullTestInterface
|
|
53
|
-
// .andWhen(store, whenCB, testResource, pm)
|
|
54
|
-
// .catch((e) => {
|
|
55
|
-
// throw e;
|
|
56
|
-
// });
|
|
57
|
-
// return new Promise((res, rej) => {
|
|
58
|
-
// fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
59
|
-
// });
|
|
60
|
-
// return await fullTestInterface.andWhen(
|
|
61
|
-
// store,
|
|
62
|
-
// whenCB,
|
|
63
|
-
// testResource,
|
|
64
|
-
// pm
|
|
65
|
-
// );
|
|
66
41
|
}
|
|
67
42
|
}, class Then extends abstractBase_js_1.BaseThen {
|
|
68
43
|
async butThen(store, thenCB, testResource, pm) {
|
|
@@ -74,42 +49,17 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
74
49
|
console.log(" ERROR ", e);
|
|
75
50
|
throw e;
|
|
76
51
|
});
|
|
77
|
-
// try {
|
|
78
|
-
// console.log("mark 4");
|
|
79
|
-
// return await fullTestInterface.butThen(
|
|
80
|
-
// store,
|
|
81
|
-
// thenCB,
|
|
82
|
-
// testResource,
|
|
83
|
-
// pm
|
|
84
|
-
// );
|
|
85
|
-
// } catch (e) {
|
|
86
|
-
// console.log("mar123");
|
|
87
|
-
// throw e;
|
|
88
|
-
// }
|
|
89
|
-
// return await fullTestInterface.butThen(
|
|
90
|
-
// store,
|
|
91
|
-
// thenCB,
|
|
92
|
-
// testResourceConfiguration,
|
|
93
|
-
// pm
|
|
94
|
-
// );
|
|
95
52
|
}
|
|
96
53
|
}, class Check extends abstractBase_js_1.BaseCheck {
|
|
97
|
-
constructor(name, features, checkCallback,
|
|
98
|
-
super(name, features, checkCallback,
|
|
99
|
-
this.initialValues =
|
|
54
|
+
constructor(name, features, checkCallback, x, i, c) {
|
|
55
|
+
super(name, features, checkCallback, x, c);
|
|
56
|
+
this.initialValues = i;
|
|
100
57
|
}
|
|
101
|
-
async checkThat(subject, testResourceConfiguration, artifactory, pm) {
|
|
102
|
-
return fullTestInterface.beforeEach(subject,
|
|
103
|
-
// (fPath: string, value: unknown) =>
|
|
104
|
-
// artifactory(`before/${fPath}`, value),
|
|
105
|
-
testResourceConfiguration, this.initialValues, pm);
|
|
58
|
+
async checkThat(subject, testResourceConfiguration, artifactory, initializer, initialValues, pm) {
|
|
59
|
+
return fullTestInterface.beforeEach(subject, initializer, testResourceConfiguration, initialValues, pm);
|
|
106
60
|
}
|
|
107
61
|
afterEach(store, key, artifactory, pm) {
|
|
108
|
-
return new Promise((res) => res(fullTestInterface.afterEach(store, key,
|
|
109
|
-
// (fPath: string, value: unknown) =>
|
|
110
|
-
// // TODO does not work?
|
|
111
|
-
// artifactory(`afterEach2-${this.name}/${fPath}`, value),
|
|
112
|
-
pm)));
|
|
62
|
+
return new Promise((res) => res(fullTestInterface.afterEach(store, key, pm)));
|
|
113
63
|
}
|
|
114
64
|
}, testResourceRequirement);
|
|
115
65
|
}
|