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
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import test from "../../../Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Ibdd_out,
|
|
4
|
+
ITestImplementation,
|
|
5
|
+
ITestSpecification,
|
|
6
|
+
} from "../../../Types.js";
|
|
3
7
|
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { IInput, testInterface } from "./index.js";
|
|
8
|
+
import { I, IInput, testInterface } from "./index.js";
|
|
7
9
|
|
|
8
10
|
export default <
|
|
9
|
-
|
|
10
|
-
unknown,
|
|
11
|
-
unknown,
|
|
12
|
-
unknown,
|
|
13
|
-
unknown,
|
|
14
|
-
unknown,
|
|
15
|
-
unknown,
|
|
16
|
-
unknown
|
|
17
|
-
>,
|
|
11
|
+
II extends I,
|
|
18
12
|
O extends Ibdd_out<
|
|
19
13
|
Record<string, any>,
|
|
20
14
|
Record<string, any>,
|
|
@@ -23,8 +17,8 @@ export default <
|
|
|
23
17
|
Record<string, any>
|
|
24
18
|
>
|
|
25
19
|
>(
|
|
26
|
-
testImplementations:
|
|
27
|
-
testSpecifications:
|
|
20
|
+
testImplementations: ITestImplementation<II, O>,
|
|
21
|
+
testSpecifications: ITestSpecification<II, O>,
|
|
28
22
|
testInput: IInput,
|
|
29
23
|
testInterface2 = testInterface
|
|
30
24
|
) => {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import test from "../../../Pure.js";
|
|
2
|
+
import {
|
|
3
|
+
Ibdd_out,
|
|
4
|
+
ITestImplementation,
|
|
5
|
+
ITestSpecification,
|
|
6
|
+
} from "../../../Types.js";
|
|
7
|
+
|
|
8
|
+
import { I, IInput, testInterface } from "./index.js";
|
|
9
|
+
|
|
10
|
+
export default <
|
|
11
|
+
II extends I,
|
|
12
|
+
O extends Ibdd_out<
|
|
13
|
+
Record<string, any>,
|
|
14
|
+
Record<string, any>,
|
|
15
|
+
Record<string, any>,
|
|
16
|
+
Record<string, any>,
|
|
17
|
+
Record<string, any>
|
|
18
|
+
>
|
|
19
|
+
>(
|
|
20
|
+
testImplementations: ITestImplementation<II, O>,
|
|
21
|
+
testSpecifications: ITestSpecification<II, O>,
|
|
22
|
+
testInput: IInput,
|
|
23
|
+
testInterface2 = testInterface
|
|
24
|
+
) => {
|
|
25
|
+
return test<I, O>(
|
|
26
|
+
testInput,
|
|
27
|
+
testSpecifications,
|
|
28
|
+
testImplementations,
|
|
29
|
+
testInterface2
|
|
30
|
+
);
|
|
31
|
+
};
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { Ibdd_in, Ibdd_out } from "../../../Types.js";
|
|
2
1
|
import test from "../../../Web.js";
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Ibdd_out,
|
|
5
|
+
ITestImplementation,
|
|
6
|
+
ITestSpecification,
|
|
7
|
+
} from "../../../Types.js";
|
|
5
8
|
|
|
6
|
-
import { IInput, testInterface } from "./index.js";
|
|
9
|
+
import { I, IInput, testInterface } from "./index.js";
|
|
7
10
|
|
|
8
11
|
export default <
|
|
9
|
-
|
|
10
|
-
unknown,
|
|
11
|
-
unknown,
|
|
12
|
-
unknown,
|
|
13
|
-
unknown,
|
|
14
|
-
unknown,
|
|
15
|
-
unknown,
|
|
16
|
-
unknown
|
|
17
|
-
>,
|
|
12
|
+
II extends I,
|
|
18
13
|
O extends Ibdd_out<
|
|
19
14
|
Record<string, any>,
|
|
20
15
|
Record<string, any>,
|
|
@@ -23,8 +18,8 @@ export default <
|
|
|
23
18
|
Record<string, any>
|
|
24
19
|
>
|
|
25
20
|
>(
|
|
26
|
-
testImplementations:
|
|
27
|
-
testSpecifications:
|
|
21
|
+
testImplementations: ITestImplementation<II, O>,
|
|
22
|
+
testSpecifications: ITestSpecification<II, O>,
|
|
28
23
|
testInput: IInput,
|
|
29
24
|
testInterface2 = testInterface
|
|
30
25
|
) => {
|
package/src/TestReport.tsx
CHANGED
|
@@ -26,8 +26,8 @@ const TestPane = ({ given }: {
|
|
|
26
26
|
given: {
|
|
27
27
|
key: string,
|
|
28
28
|
name: string,
|
|
29
|
-
error
|
|
30
|
-
features
|
|
29
|
+
error?: string[],
|
|
30
|
+
features?: string[],
|
|
31
31
|
whens: {
|
|
32
32
|
name: string;
|
|
33
33
|
error: string;
|
|
@@ -41,6 +41,7 @@ const TestPane = ({ given }: {
|
|
|
41
41
|
|
|
42
42
|
return <div> <Tab.Container id="TestPane-tabs" defaultActiveKey="first">
|
|
43
43
|
<Row>
|
|
44
|
+
|
|
44
45
|
<Col sm={3}>
|
|
45
46
|
<Nav variant="pills" className="flex-column">
|
|
46
47
|
|
|
@@ -61,7 +62,7 @@ const TestPane = ({ given }: {
|
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
</Col>
|
|
64
|
-
<Col sm={
|
|
65
|
+
<Col sm={6}>
|
|
65
66
|
<Tab.Content>
|
|
66
67
|
|
|
67
68
|
<Tab.Pane eventKey={`bdd-features`}>
|
|
@@ -87,18 +88,18 @@ const TestPane = ({ given }: {
|
|
|
87
88
|
|
|
88
89
|
const BddPage = () => {
|
|
89
90
|
|
|
90
|
-
const [configs, setConfigs] = useState<IBuiltConfig>();
|
|
91
|
-
useEffect(() => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
// const [configs, setConfigs] = useState<IBuiltConfig>();
|
|
92
|
+
// useEffect(() => {
|
|
93
|
+
// (async () => {
|
|
94
|
+
// fetch('../config.json')
|
|
95
|
+
// .then(response => response.json())
|
|
96
|
+
// .then(json => {
|
|
97
|
+
// setConfigs(json)
|
|
98
|
+
// })
|
|
99
|
+
// .catch(error => console.error(error));
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
}, []);
|
|
101
|
+
// })();
|
|
102
|
+
// }, []);
|
|
102
103
|
|
|
103
104
|
|
|
104
105
|
const [bddErrors, setBddErrors] = useState<{
|
|
@@ -119,9 +120,16 @@ const BddPage = () => {
|
|
|
119
120
|
(async () => {
|
|
120
121
|
setBddErrors(await (await fetch(`tests.json`)).json());
|
|
121
122
|
})();
|
|
122
|
-
}, [
|
|
123
|
+
}, []);
|
|
123
124
|
|
|
124
|
-
|
|
125
|
+
const [log, setLog] = useState<string>();
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
(async () => {
|
|
128
|
+
setLog(await (await fetch(`log.txt`)).text());
|
|
129
|
+
})();
|
|
130
|
+
}, []);
|
|
131
|
+
|
|
132
|
+
if (!bddErrors || !log) {
|
|
125
133
|
return <div>loading...</div>
|
|
126
134
|
}
|
|
127
135
|
|
|
@@ -132,6 +140,13 @@ const BddPage = () => {
|
|
|
132
140
|
<Row>
|
|
133
141
|
<Tab.Container id="root-tab-container" defaultActiveKey="first">
|
|
134
142
|
<Row>
|
|
143
|
+
|
|
144
|
+
<Col sm={3}>
|
|
145
|
+
<pre><code>{log}</code></pre>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</Col>
|
|
149
|
+
|
|
135
150
|
<Col sm={3}>
|
|
136
151
|
<Nav variant="pills" className="flex-column">
|
|
137
152
|
|
|
@@ -147,7 +162,7 @@ const BddPage = () => {
|
|
|
147
162
|
|
|
148
163
|
</Nav>
|
|
149
164
|
</Col>
|
|
150
|
-
<Col sm={
|
|
165
|
+
<Col sm={6}>
|
|
151
166
|
<Tab.Content>
|
|
152
167
|
{
|
|
153
168
|
...bddErrors.givens.map((g) =>
|
|
@@ -169,8 +184,11 @@ const BddPage = () => {
|
|
|
169
184
|
document.addEventListener("DOMContentLoaded", function () {
|
|
170
185
|
const elem = document.getElementById("root");
|
|
171
186
|
if (elem) {
|
|
172
|
-
|
|
187
|
+
if (elem) {
|
|
188
|
+
const root = ReactDom.createRoot(elem);
|
|
189
|
+
root.render(React.createElement(BddPage, {}));
|
|
190
|
+
}
|
|
173
191
|
}
|
|
174
192
|
});
|
|
175
193
|
|
|
176
|
-
console.log("hello BddPage!")
|
|
194
|
+
console.log("hello BddPage!")
|
package/src/Types.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin } from "esbuild";
|
|
2
|
+
|
|
3
|
+
import { ITTestResourceConfiguration } from "./lib/index.js";
|
|
2
4
|
import {
|
|
3
5
|
IGivens,
|
|
4
6
|
BaseCheck,
|
|
@@ -7,133 +9,84 @@ import {
|
|
|
7
9
|
BaseThen,
|
|
8
10
|
BaseGiven,
|
|
9
11
|
} from "./lib/abstractBase.js";
|
|
12
|
+
import { IPM, ITestCheckCallback } from "./lib/types.js";
|
|
10
13
|
import { PM } from "./PM/index.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
I extends Ibdd_in<
|
|
15
|
-
unknown,
|
|
16
|
-
unknown,
|
|
17
|
-
unknown,
|
|
18
|
-
unknown,
|
|
19
|
-
unknown,
|
|
20
|
-
unknown,
|
|
21
|
-
unknown
|
|
22
|
-
>
|
|
23
|
-
> = {
|
|
24
|
-
assertThis: (x: I["then"]) => void;
|
|
14
|
+
|
|
15
|
+
export type ITestInterface<I extends IT = IT> = {
|
|
16
|
+
assertThis: (x: I["then"]) => any;
|
|
25
17
|
andWhen: (
|
|
26
18
|
store: I["istore"],
|
|
27
19
|
whenCB: I["when"],
|
|
28
20
|
testResource: ITTestResourceConfiguration,
|
|
29
|
-
pm:
|
|
21
|
+
pm: IPM
|
|
30
22
|
) => Promise<I["istore"]>;
|
|
31
23
|
butThen: (
|
|
32
24
|
store: I["istore"],
|
|
33
25
|
thenCB: I["then"],
|
|
34
26
|
testResource: ITTestResourceConfiguration,
|
|
35
|
-
pm:
|
|
27
|
+
pm: IPM
|
|
36
28
|
) => Promise<I["iselection"]>;
|
|
37
|
-
afterAll: (store: I["istore"], pm:
|
|
38
|
-
afterEach: (store: I["istore"], key: string, pm:
|
|
29
|
+
afterAll: (store: I["istore"], pm: IPM) => any;
|
|
30
|
+
afterEach: (store: I["istore"], key: string, pm: IPM) => Promise<unknown>;
|
|
39
31
|
beforeAll: (
|
|
40
32
|
input: I["iinput"],
|
|
41
33
|
testResource: ITTestResourceConfiguration,
|
|
42
|
-
pm:
|
|
34
|
+
pm: IPM
|
|
43
35
|
) => Promise<I["isubject"]>;
|
|
44
36
|
beforeEach: (
|
|
45
37
|
subject: I["isubject"],
|
|
46
38
|
initializer: (c?) => I["given"],
|
|
47
39
|
testResource: ITTestResourceConfiguration,
|
|
48
40
|
initialValues,
|
|
49
|
-
pm:
|
|
41
|
+
pm: IPM
|
|
50
42
|
) => Promise<I["istore"]>;
|
|
51
43
|
};
|
|
52
44
|
|
|
53
|
-
export type IWebTestInterface<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
> = ITestInterface<I>;
|
|
64
|
-
|
|
65
|
-
export type INodeTestInterface<
|
|
66
|
-
I extends Ibdd_in<
|
|
67
|
-
unknown,
|
|
68
|
-
unknown,
|
|
69
|
-
unknown,
|
|
70
|
-
unknown,
|
|
71
|
-
unknown,
|
|
72
|
-
unknown,
|
|
73
|
-
unknown
|
|
74
|
-
>
|
|
75
|
-
> = ITestInterface<I>;
|
|
76
|
-
|
|
77
|
-
export type IPartialInterface<
|
|
78
|
-
I extends Ibdd_in<
|
|
79
|
-
unknown,
|
|
80
|
-
unknown,
|
|
81
|
-
unknown,
|
|
82
|
-
unknown,
|
|
83
|
-
unknown,
|
|
84
|
-
unknown,
|
|
85
|
-
unknown
|
|
86
|
-
>
|
|
87
|
-
> = Partial<ITestInterface<I>>;
|
|
88
|
-
|
|
89
|
-
export type IPartialNodeInterface<
|
|
90
|
-
I extends Ibdd_in<
|
|
91
|
-
unknown,
|
|
92
|
-
unknown,
|
|
93
|
-
unknown,
|
|
94
|
-
unknown,
|
|
95
|
-
unknown,
|
|
96
|
-
unknown,
|
|
97
|
-
unknown
|
|
98
|
-
>
|
|
99
|
-
> = Partial<INodeTestInterface<I>>;
|
|
100
|
-
export type IPartialWebInterface<
|
|
101
|
-
I extends Ibdd_in<
|
|
102
|
-
unknown,
|
|
103
|
-
unknown,
|
|
104
|
-
unknown,
|
|
105
|
-
unknown,
|
|
106
|
-
unknown,
|
|
107
|
-
unknown,
|
|
108
|
-
unknown
|
|
109
|
-
>
|
|
110
|
-
> = Partial<IWebTestInterface<I>>;
|
|
45
|
+
export type IWebTestInterface<I extends IT> = ITestInterface<I>;
|
|
46
|
+
|
|
47
|
+
export type INodeTestInterface<I extends IT> = ITestInterface<I>;
|
|
48
|
+
|
|
49
|
+
export type IPartialInterface<I extends IT> = Partial<ITestInterface<I>>;
|
|
50
|
+
|
|
51
|
+
export type IPartialNodeInterface<I extends IT> = Partial<
|
|
52
|
+
INodeTestInterface<I>
|
|
53
|
+
>;
|
|
54
|
+
export type IPartialWebInterface<I extends IT> = Partial<IWebTestInterface<I>>;
|
|
111
55
|
|
|
112
56
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
113
57
|
|
|
114
|
-
export type
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
58
|
+
export type IT = Ibdd_in<
|
|
59
|
+
unknown,
|
|
60
|
+
unknown,
|
|
61
|
+
unknown,
|
|
62
|
+
unknown,
|
|
63
|
+
unknown,
|
|
64
|
+
unknown,
|
|
65
|
+
unknown
|
|
66
|
+
>;
|
|
67
|
+
|
|
68
|
+
export type OT = Ibdd_out<
|
|
69
|
+
Record<string, any>,
|
|
70
|
+
Record<string, any>,
|
|
71
|
+
Record<string, any>,
|
|
72
|
+
Record<string, any>,
|
|
73
|
+
Record<string, any>
|
|
74
|
+
>;
|
|
75
|
+
|
|
76
|
+
// export type MT<O extends OT> = Partial<{
|
|
77
|
+
// suites: { [K in keyof O["suites"]]: unknown };
|
|
78
|
+
// givens: { [K in keyof O["givens"]]: unknown };
|
|
79
|
+
// whens: { [K in keyof O["whens"]]: unknown };
|
|
80
|
+
// thens: { [K in keyof O["thens"]]: unknown };
|
|
81
|
+
// checks: { [K in keyof O["checks"]]: unknown };
|
|
82
|
+
// }>;
|
|
83
|
+
|
|
84
|
+
export type ITestSpecification<I extends IT, O extends OT> = (
|
|
132
85
|
Suite: {
|
|
133
86
|
[K in keyof O["suites"]]: (
|
|
134
87
|
name: string,
|
|
135
88
|
givens: IGivens<I>,
|
|
136
|
-
checks: BaseCheck<I
|
|
89
|
+
checks: BaseCheck<I>[]
|
|
137
90
|
) => BaseSuite<I, O>;
|
|
138
91
|
},
|
|
139
92
|
Given: {
|
|
@@ -156,54 +109,44 @@ export type ITestSpecification<
|
|
|
156
109
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
157
110
|
|
|
158
111
|
export type ITestImplementation<
|
|
159
|
-
I extends
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
thens: {
|
|
188
|
-
[K in keyof O["thens"]]: (
|
|
189
|
-
...It: O["thens"][K]
|
|
190
|
-
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
191
|
-
};
|
|
192
|
-
checks: {
|
|
193
|
-
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
194
|
-
};
|
|
195
|
-
};
|
|
112
|
+
I extends IT,
|
|
113
|
+
O extends OT,
|
|
114
|
+
modifier = {}
|
|
115
|
+
> = Modify<
|
|
116
|
+
{
|
|
117
|
+
suites: {
|
|
118
|
+
[K in keyof O["suites"]]: string;
|
|
119
|
+
};
|
|
120
|
+
givens: {
|
|
121
|
+
[K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
122
|
+
};
|
|
123
|
+
whens: {
|
|
124
|
+
[K in keyof O["whens"]]: (
|
|
125
|
+
...Iw: O["whens"][K]
|
|
126
|
+
) => (zel: I["iselection"], utils: PM) => Promise<I["when"]>;
|
|
127
|
+
};
|
|
128
|
+
thens: {
|
|
129
|
+
[K in keyof O["thens"]]: (
|
|
130
|
+
...It: O["thens"][K]
|
|
131
|
+
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
132
|
+
};
|
|
133
|
+
checks: {
|
|
134
|
+
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
modifier
|
|
138
|
+
>;
|
|
196
139
|
|
|
197
140
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
198
141
|
|
|
199
142
|
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
200
143
|
|
|
201
144
|
export type Ibdd_out<
|
|
202
|
-
ISuites extends Record<string, any>,
|
|
203
|
-
IGivens extends Record<string, any>,
|
|
204
|
-
IWhens extends Record<string, any>,
|
|
205
|
-
IThens extends Record<string, any>,
|
|
206
|
-
IChecks extends Record<string, any>
|
|
145
|
+
ISuites extends Record<string, any> = Record<string, any>,
|
|
146
|
+
IGivens extends Record<string, any> = Record<string, any>,
|
|
147
|
+
IWhens extends Record<string, any> = Record<string, any>,
|
|
148
|
+
IThens extends Record<string, any> = Record<string, any>,
|
|
149
|
+
IChecks extends Record<string, any> = Record<string, any>
|
|
207
150
|
> = {
|
|
208
151
|
suites: ISuites;
|
|
209
152
|
givens: IGivens;
|
|
@@ -229,3 +172,34 @@ export type Ibdd_in<
|
|
|
229
172
|
when: IWhen;
|
|
230
173
|
then: IThen;
|
|
231
174
|
};
|
|
175
|
+
|
|
176
|
+
///////////////////////////////////////////////
|
|
177
|
+
|
|
178
|
+
export type IPluginFactory = (
|
|
179
|
+
register: (entrypoint: string, sources: string[]) => any,
|
|
180
|
+
entrypoints: string[]
|
|
181
|
+
) => Plugin;
|
|
182
|
+
|
|
183
|
+
export type IRunTime = `node` | `web` | "pure";
|
|
184
|
+
|
|
185
|
+
export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
|
|
186
|
+
|
|
187
|
+
export type ITestconfig = {
|
|
188
|
+
clearScreen: boolean;
|
|
189
|
+
debugger: boolean;
|
|
190
|
+
externals: string[];
|
|
191
|
+
featureIngestor: (s: string) => Promise<string>;
|
|
192
|
+
importPlugins: IPluginFactory[];
|
|
193
|
+
minify: boolean;
|
|
194
|
+
nodePlugins: IPluginFactory[];
|
|
195
|
+
ports: string[];
|
|
196
|
+
src: string;
|
|
197
|
+
tests: ITestTypes[];
|
|
198
|
+
webPlugins: IPluginFactory[];
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export type IBuiltConfig = { buildDir: string } & ITestconfig;
|
|
202
|
+
|
|
203
|
+
export type IProject = {
|
|
204
|
+
projects: Record<string, ITestconfig>;
|
|
205
|
+
};
|
package/src/Web.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { PM_Web } from "./PM/web";
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
Ibdd_out,
|
|
3
|
+
IT,
|
|
5
4
|
ITestImplementation,
|
|
6
5
|
ITestInterface,
|
|
7
6
|
ITestSpecification,
|
|
8
7
|
IWebTestInterface,
|
|
8
|
+
OT,
|
|
9
9
|
} from "./Types";
|
|
10
10
|
import Testeranto from "./lib/core.js";
|
|
11
11
|
import {
|
|
12
|
-
IFinalResults,
|
|
13
12
|
ITTestResourceConfiguration,
|
|
14
13
|
ITTestResourceRequest,
|
|
15
14
|
defaultTestResourceRequirement,
|
|
@@ -22,28 +21,15 @@ let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
|
22
21
|
// throw event;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export class WebTesteranto<
|
|
26
|
-
I
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
unknown,
|
|
31
|
-
unknown,
|
|
32
|
-
unknown,
|
|
33
|
-
unknown
|
|
34
|
-
>,
|
|
35
|
-
O extends Ibdd_out<
|
|
36
|
-
Record<string, any>,
|
|
37
|
-
Record<string, any>,
|
|
38
|
-
Record<string, any>,
|
|
39
|
-
Record<string, any>,
|
|
40
|
-
Record<string, any>
|
|
41
|
-
>
|
|
42
|
-
> extends Testeranto<I, O> {
|
|
24
|
+
export class WebTesteranto<I extends IT, O extends OT, M> extends Testeranto<
|
|
25
|
+
I,
|
|
26
|
+
O,
|
|
27
|
+
M
|
|
28
|
+
> {
|
|
43
29
|
constructor(
|
|
44
30
|
input: I["iinput"],
|
|
45
31
|
testSpecification: ITestSpecification<I, O>,
|
|
46
|
-
testImplementation: ITestImplementation<I, O>,
|
|
32
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
47
33
|
testResourceRequirement: ITTestResourceRequest,
|
|
48
34
|
testInterface: Partial<ITestInterface<I>>
|
|
49
35
|
) {
|
|
@@ -92,39 +78,18 @@ export class WebTesteranto<
|
|
|
92
78
|
async receiveTestResourceConfig(partialTestResource: any) {
|
|
93
79
|
const t: ITTestResourceConfiguration = partialTestResource; //JSON.parse(partialTestResource);
|
|
94
80
|
const pm = new PM_Web(t);
|
|
95
|
-
|
|
96
|
-
await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
97
|
-
return new Promise<IFinalResults>((res, rej) => {
|
|
98
|
-
res({ features, failed });
|
|
99
|
-
});
|
|
81
|
+
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
100
82
|
}
|
|
101
83
|
}
|
|
102
84
|
|
|
103
|
-
export default async <
|
|
104
|
-
I extends Ibdd_in<
|
|
105
|
-
unknown,
|
|
106
|
-
unknown,
|
|
107
|
-
unknown,
|
|
108
|
-
unknown,
|
|
109
|
-
unknown,
|
|
110
|
-
unknown,
|
|
111
|
-
unknown
|
|
112
|
-
>,
|
|
113
|
-
O extends Ibdd_out<
|
|
114
|
-
Record<string, any>,
|
|
115
|
-
Record<string, any>,
|
|
116
|
-
Record<string, any>,
|
|
117
|
-
Record<string, any>,
|
|
118
|
-
Record<string, any>
|
|
119
|
-
>
|
|
120
|
-
>(
|
|
85
|
+
export default async <I extends IT, O extends OT, M>(
|
|
121
86
|
input: I["iinput"],
|
|
122
87
|
testSpecification: ITestSpecification<I, O>,
|
|
123
|
-
testImplementation: ITestImplementation<I, O>,
|
|
88
|
+
testImplementation: ITestImplementation<I, O, M>,
|
|
124
89
|
testInterface: Partial<IWebTestInterface<I>>,
|
|
125
90
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
|
|
126
|
-
): Promise<Testeranto<I, O>> => {
|
|
127
|
-
return new WebTesteranto<I, O>(
|
|
91
|
+
): Promise<Testeranto<I, O, M>> => {
|
|
92
|
+
return new WebTesteranto<I, O, M>(
|
|
128
93
|
input,
|
|
129
94
|
testSpecification,
|
|
130
95
|
testImplementation,
|