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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Testeranto from "../../../Pure.js";
|
|
2
|
+
|
|
3
|
+
import { ITestImplementation, ITestSpecification, OT } from "../../../Types";
|
|
4
|
+
|
|
5
|
+
import { I, testInterface } from "./static.js";
|
|
6
|
+
|
|
7
|
+
export default <O extends OT, M>(
|
|
8
|
+
testImplementations: ITestImplementation<I, O, M>,
|
|
9
|
+
testSpecifications: ITestSpecification<I, O>,
|
|
10
|
+
testInput: I["iinput"]
|
|
11
|
+
) => {
|
|
12
|
+
return Testeranto<I, O, M>(
|
|
13
|
+
testInput,
|
|
14
|
+
testSpecifications,
|
|
15
|
+
testImplementations,
|
|
16
|
+
testInterface
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createElement, useEffect, useRef } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDom from "react-dom/client";
|
|
4
|
+
|
|
5
|
+
import { Ibdd_in, IPartialInterface } from "../../../Types";
|
|
6
|
+
|
|
7
|
+
import { IInput, ISelection, IStore } from ".";
|
|
8
|
+
import { IPM } from "../../../lib/types";
|
|
9
|
+
|
|
10
|
+
export type I = Ibdd_in<
|
|
11
|
+
IInput,
|
|
12
|
+
HTMLElement,
|
|
13
|
+
ISelection,
|
|
14
|
+
IStore,
|
|
15
|
+
unknown,
|
|
16
|
+
(s: HTMLElement, p: IPM) => any,
|
|
17
|
+
(s: HTMLElement, p: IPM) => any
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
const TesterantoComponent = ({
|
|
21
|
+
done,
|
|
22
|
+
innerComp,
|
|
23
|
+
}: {
|
|
24
|
+
done: (ref: React.MutableRefObject<any>) => any;
|
|
25
|
+
innerComp: IInput;
|
|
26
|
+
}) => {
|
|
27
|
+
const myContainer = useRef<any>(null);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
done(myContainer.current);
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
return React.createElement("div", { ref: myContainer }, innerComp());
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const testInterface: IPartialInterface<I> = {
|
|
36
|
+
beforeAll: async (reactElement, itr): Promise<any> => {
|
|
37
|
+
return await new Promise((resolve, rej) => {
|
|
38
|
+
const htmlElement = document.getElementById("root");
|
|
39
|
+
|
|
40
|
+
if (htmlElement) {
|
|
41
|
+
const domRoot = ReactDom.createRoot(htmlElement);
|
|
42
|
+
|
|
43
|
+
domRoot.render(
|
|
44
|
+
createElement(
|
|
45
|
+
TesterantoComponent,
|
|
46
|
+
{
|
|
47
|
+
// ...initialProps,
|
|
48
|
+
innerComp: reactElement,
|
|
49
|
+
done: (reactElement) => {
|
|
50
|
+
resolve({
|
|
51
|
+
htmlElement,
|
|
52
|
+
reactElement,
|
|
53
|
+
domRoot,
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
[]
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
// resolve({ htmlElement });
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
beforeEach: async (subject) => {
|
|
67
|
+
return subject;
|
|
68
|
+
},
|
|
69
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
70
|
+
return whenCB(s, utils);
|
|
71
|
+
},
|
|
72
|
+
butThen: async function (s, thenCB, tr, utils) {
|
|
73
|
+
return new Promise((resolve, rej) => {
|
|
74
|
+
resolve(thenCB(s, utils));
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
afterEach: async function (store, ndx, artificer) {
|
|
78
|
+
return new Promise((resolve, rej) => {
|
|
79
|
+
resolve({});
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
afterAll: (store, artificer) => {
|
|
83
|
+
return new Promise((resolve, rej) => {
|
|
84
|
+
resolve({});
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
};
|
|
@@ -1,147 +1,19 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from "react";
|
|
2
|
-
import { CElement, createElement } from "react";
|
|
3
|
-
import ReactDom from "react-dom";
|
|
4
|
-
|
|
5
1
|
import Testeranto from "../../../Web.js";
|
|
6
|
-
import {
|
|
7
|
-
Ibdd_in,
|
|
8
|
-
Ibdd_out,
|
|
9
|
-
ITestImplementation,
|
|
10
|
-
ITestSpecification,
|
|
11
|
-
} from "../../../Types";
|
|
12
|
-
|
|
13
|
-
import type {
|
|
14
|
-
IInput,
|
|
15
|
-
ISelection,
|
|
16
|
-
IStore,
|
|
17
|
-
IThenShape,
|
|
18
|
-
IWhenShape,
|
|
19
|
-
} from "./index";
|
|
20
|
-
|
|
21
|
-
export type ISubject = HTMLElement;
|
|
2
|
+
import { ITestImplementation, ITestSpecification, OT } from "../../../Types";
|
|
22
3
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
innerComp,
|
|
26
|
-
}: {
|
|
27
|
-
done: (ref: React.MutableRefObject<any>) => any;
|
|
28
|
-
innerComp: IInput;
|
|
29
|
-
}) => {
|
|
30
|
-
const myContainer = useRef<any>(null);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
console.log("useEffect called!", myContainer.current);
|
|
33
|
-
done(myContainer.current);
|
|
34
|
-
}, []);
|
|
35
|
-
|
|
36
|
-
return React.createElement("div", { ref: myContainer }, innerComp());
|
|
37
|
-
};
|
|
4
|
+
import type { IInput } from "./index";
|
|
5
|
+
import { I, testInterfacer } from "./dynamic.js";
|
|
38
6
|
|
|
39
|
-
export default <
|
|
40
|
-
I
|
|
41
|
-
IInput,
|
|
42
|
-
ISubject,
|
|
43
|
-
ISelection,
|
|
44
|
-
IStore,
|
|
45
|
-
unknown,
|
|
46
|
-
IWhenShape,
|
|
47
|
-
IThenShape
|
|
48
|
-
>,
|
|
49
|
-
O extends Ibdd_out<
|
|
50
|
-
Record<string, any>,
|
|
51
|
-
Record<string, any>,
|
|
52
|
-
Record<string, any>,
|
|
53
|
-
Record<string, any>,
|
|
54
|
-
Record<string, any>
|
|
55
|
-
>
|
|
56
|
-
>(
|
|
57
|
-
testImplementations: ITestImplementation<I, O>,
|
|
7
|
+
export default <O extends OT, M>(
|
|
8
|
+
testImplementations: ITestImplementation<I, O, M>,
|
|
58
9
|
testSpecifications: ITestSpecification<I, O>,
|
|
59
10
|
testInput: IInput
|
|
60
11
|
) => {
|
|
61
|
-
const t = Testeranto<I, O>(
|
|
12
|
+
const t = Testeranto<I, O, M>(
|
|
62
13
|
testInput,
|
|
63
14
|
testSpecifications,
|
|
64
15
|
testImplementations,
|
|
65
|
-
|
|
66
|
-
beforeAll: async (reactElement, itr): Promise<any> => {
|
|
67
|
-
return await new Promise((resolve, rej) => {
|
|
68
|
-
const htmlElement = document.getElementById("root");
|
|
69
|
-
|
|
70
|
-
if (htmlElement) {
|
|
71
|
-
const domRoot = ReactDom.createRoot(htmlElement);
|
|
72
|
-
|
|
73
|
-
domRoot.render(
|
|
74
|
-
createElement(
|
|
75
|
-
TesterantoComponent,
|
|
76
|
-
{
|
|
77
|
-
// ...initialProps,
|
|
78
|
-
innerComp: reactElement,
|
|
79
|
-
done: (reactElement) => {
|
|
80
|
-
resolve({
|
|
81
|
-
htmlElement,
|
|
82
|
-
reactElement,
|
|
83
|
-
domRoot,
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
[]
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
// resolve({ htmlElement });
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
beforeEach: async (subject) => {
|
|
97
|
-
return subject;
|
|
98
|
-
// return new Promise((resolve, rej) => {
|
|
99
|
-
// resolve(subject);
|
|
100
|
-
// // const tc = TesterantoComponent({
|
|
101
|
-
// // innerComp: () =>
|
|
102
|
-
// // testInput({
|
|
103
|
-
// // port: 3003,
|
|
104
|
-
// // address: "some-address",
|
|
105
|
-
// // secretKey: "someSecretKey",
|
|
106
|
-
// // abi: "foo",
|
|
107
|
-
// // }),
|
|
108
|
-
// // done: (reactElement: any) => {
|
|
109
|
-
// // console.log("mark9");
|
|
110
|
-
// // resolve(reactElement);
|
|
111
|
-
// // // process.nextTick(() => {
|
|
112
|
-
// // // resolve(reactElement);
|
|
113
|
-
// // // });
|
|
114
|
-
// // },
|
|
115
|
-
// // });
|
|
116
|
-
// // console.log("mark9", tc);
|
|
117
|
-
// // createPortal(tc, subject.domRoot);
|
|
118
|
-
// });
|
|
119
|
-
},
|
|
120
|
-
andWhen: async function (s, whenCB, tr, utils) {
|
|
121
|
-
return whenCB(s, utils);
|
|
122
|
-
// return new Promise(async (resolve, rej) => {
|
|
123
|
-
// // resolve(await whenCB(s, utils));
|
|
124
|
-
// // process.nextTick(() => {
|
|
125
|
-
// // resolve(whenCB()(s));
|
|
126
|
-
// // });
|
|
127
|
-
// });
|
|
128
|
-
},
|
|
129
|
-
butThen: async function (s, thenCB, tr, utils) {
|
|
130
|
-
return new Promise((resolve, rej) => {
|
|
131
|
-
resolve(thenCB(s, utils));
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
afterEach: async function (store: IStore, ndx, artificer) {
|
|
135
|
-
return new Promise((resolve, rej) => {
|
|
136
|
-
resolve({});
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
afterAll: (store: IStore, artificer) => {
|
|
140
|
-
return new Promise((resolve, rej) => {
|
|
141
|
-
resolve({});
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
}
|
|
16
|
+
testInterfacer(testInput)
|
|
145
17
|
);
|
|
146
18
|
|
|
147
19
|
document.addEventListener("DOMContentLoaded", function () {
|
|
@@ -1,56 +1,32 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { ReactTestRenderer } from "react-test-renderer";
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
Ibdd_in,
|
|
6
|
-
Ibdd_out,
|
|
7
|
-
ITestImplementation,
|
|
8
|
-
ITestSpecification,
|
|
9
|
-
} from "../../../Types";
|
|
10
|
-
|
|
11
|
-
export type ISuper<T> = T extends infer U ? U : object;
|
|
4
|
+
import type { Ibdd_in } from "../../../Types";
|
|
12
5
|
|
|
13
6
|
export type IInput<P, S> = typeof React.Component<P, S>;
|
|
14
|
-
export type InitialState = unknown;
|
|
15
|
-
export type IWhenShape = any;
|
|
16
|
-
export type IThenShape = any;
|
|
17
|
-
export type ISelection = renderer.ReactTestRenderer;
|
|
18
|
-
export type IStore = renderer.ReactTestRenderer;
|
|
19
|
-
export type ISubject = renderer.ReactTestRenderer;
|
|
20
7
|
|
|
21
|
-
export type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
unknown,
|
|
47
|
-
unknown
|
|
48
|
-
>,
|
|
49
|
-
O extends Ibdd_out<
|
|
50
|
-
Record<string, any>,
|
|
51
|
-
Record<string, any>,
|
|
52
|
-
Record<string, any>,
|
|
53
|
-
Record<string, any>,
|
|
54
|
-
Record<string, any>
|
|
55
|
-
>
|
|
56
|
-
> = ITestSpecification<I, O>;
|
|
8
|
+
export type I = Ibdd_in<
|
|
9
|
+
IInput<any, any>,
|
|
10
|
+
ReactTestRenderer,
|
|
11
|
+
ReactTestRenderer,
|
|
12
|
+
ReactTestRenderer,
|
|
13
|
+
unknown,
|
|
14
|
+
unknown,
|
|
15
|
+
(r: ReactTestRenderer) => ReactTestRenderer
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
// export type ISuper<T> = T extends infer U ? U : object;
|
|
19
|
+
|
|
20
|
+
// export type InitialState = unknown;
|
|
21
|
+
// export type IWhenShape = any;
|
|
22
|
+
// export type IThenShape = any;
|
|
23
|
+
// export type ISelection = renderer.ReactTestRenderer;
|
|
24
|
+
// export type IStore = renderer.ReactTestRenderer;
|
|
25
|
+
// export type ISubject = renderer.ReactTestRenderer;
|
|
26
|
+
|
|
27
|
+
// export type IImpl<I extends IT, O extends OT, M> = ITestImplementation<I, O>;
|
|
28
|
+
// export type ITestSpecification<
|
|
29
|
+
// I extends IT,
|
|
30
|
+
// O extends OT,
|
|
31
|
+
// M
|
|
32
|
+
// > = ITestSpecification<I, O>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer, { act } from "react-test-renderer";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { IPartialInterface } from "../../../Types";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { I } from ".";
|
|
7
|
+
|
|
8
|
+
export const testInterface: IPartialInterface<I> = {
|
|
7
9
|
beforeEach: function (
|
|
8
10
|
CComponent,
|
|
9
11
|
propsAndChildren: () => any
|
|
@@ -29,13 +31,13 @@ export const testInterface = {
|
|
|
29
31
|
// andWhen: function (s: Store, whenCB): Promise<Selection> {
|
|
30
32
|
// return whenCB()(s);
|
|
31
33
|
// },
|
|
32
|
-
butThen: async function (s
|
|
34
|
+
butThen: async function (s, thenCB, tr) {
|
|
33
35
|
return thenCB(s);
|
|
34
36
|
},
|
|
35
|
-
afterEach: async function (store
|
|
37
|
+
afterEach: async function (store, ndx, artificer) {
|
|
36
38
|
return {};
|
|
37
39
|
},
|
|
38
|
-
afterAll: (store
|
|
40
|
+
afterAll: (store, artificer) => {
|
|
39
41
|
return;
|
|
40
42
|
},
|
|
41
43
|
};
|
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
import Testeranto from "../../../Node.js";
|
|
2
|
-
import { Ibdd_in, Ibdd_out } from "../../../Types.js";
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { ITestImplementation, ITestSpecification, OT } from "../../../Types.js";
|
|
4
|
+
|
|
5
|
+
import { IInput, I } from "./index.js";
|
|
5
6
|
import { testInterface } from "./interface.js";
|
|
6
7
|
|
|
7
|
-
export default <
|
|
8
|
-
I
|
|
9
|
-
|
|
10
|
-
unknown,
|
|
11
|
-
unknown,
|
|
12
|
-
unknown,
|
|
13
|
-
unknown,
|
|
14
|
-
unknown,
|
|
15
|
-
unknown
|
|
16
|
-
>,
|
|
17
|
-
O extends Ibdd_out<
|
|
18
|
-
Record<string, any>,
|
|
19
|
-
Record<string, any>,
|
|
20
|
-
Record<string, any>,
|
|
21
|
-
Record<string, any>,
|
|
22
|
-
Record<string, any>
|
|
23
|
-
>,
|
|
24
|
-
IProps,
|
|
25
|
-
IState
|
|
26
|
-
>(
|
|
27
|
-
testImplementations: IImpl<I, O>,
|
|
28
|
-
testSpecifications: ISpec<I, O>,
|
|
8
|
+
export default <O extends OT, IProps, IState, M = {}>(
|
|
9
|
+
testImplementations: ITestImplementation<I, O, M>,
|
|
10
|
+
testSpecifications: ITestSpecification<I, O>,
|
|
29
11
|
testInput: IInput<IProps, IState>
|
|
30
12
|
) =>
|
|
31
|
-
Testeranto<I, O>(
|
|
13
|
+
Testeranto<I, O, M>(
|
|
32
14
|
testInput,
|
|
33
15
|
testSpecifications,
|
|
34
16
|
testImplementations,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Testeranto from "../../../Pure.js";
|
|
2
|
+
|
|
3
|
+
import { ITestImplementation, ITestSpecification, OT } from "../../../Types.js";
|
|
4
|
+
|
|
5
|
+
import { IInput, I } from "./index.js";
|
|
6
|
+
import { testInterface } from "./interface";
|
|
7
|
+
|
|
8
|
+
export default <O extends OT, M = {}>(
|
|
9
|
+
testImplementations: ITestImplementation<I, O, M>,
|
|
10
|
+
testSpecifications: ITestSpecification<I, O>,
|
|
11
|
+
testInput: IInput<any, any>
|
|
12
|
+
) =>
|
|
13
|
+
Testeranto<I, O, M>(
|
|
14
|
+
testInput,
|
|
15
|
+
testSpecifications,
|
|
16
|
+
testImplementations,
|
|
17
|
+
testInterface
|
|
18
|
+
);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// import { ITestImplementation } from "testeranto/src/Types";
|
|
2
|
+
// import { I } from "testeranto/src/SubPackages/react-test-renderer/component";
|
|
3
|
+
|
|
4
|
+
import { ReactTestRenderer } from "react-test-renderer";
|
|
5
|
+
import { assert } from "chai";
|
|
6
|
+
|
|
7
|
+
import { O } from "../../../../examples/react/component/test";
|
|
8
|
+
import { I } from "..";
|
|
9
|
+
import { ITestImplementation } from "../../../../Types";
|
|
10
|
+
|
|
11
|
+
export const testImplementation: ITestImplementation<I, O> = {
|
|
12
|
+
suites: {
|
|
13
|
+
Default: "default",
|
|
14
|
+
},
|
|
15
|
+
givens: {
|
|
16
|
+
AnEmptyState: (): { foo: string } => {
|
|
17
|
+
return { foo: "bar" };
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
whens: {
|
|
21
|
+
IClickTheButton: () => async (component) => {
|
|
22
|
+
const button = component.root.findByType("button");
|
|
23
|
+
button.props.onClick();
|
|
24
|
+
return component;
|
|
25
|
+
},
|
|
26
|
+
IClickTheHeader: () => async (component) => {
|
|
27
|
+
try {
|
|
28
|
+
const header = component.root.findByType("h1");
|
|
29
|
+
header.props.onClick();
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
} catch (error) {
|
|
32
|
+
// Expected error - header click fails
|
|
33
|
+
}
|
|
34
|
+
return component;
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
thens: {
|
|
38
|
+
ThePropsIs: (expectation) => (component) => {
|
|
39
|
+
const propsElement = component.root.findByProps({ id: "theProps" });
|
|
40
|
+
return assert.deepEqual(
|
|
41
|
+
JSON.parse(propsElement.props.children),
|
|
42
|
+
expectation
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
TheStatusIs: (expectation) => (component) => {
|
|
47
|
+
try {
|
|
48
|
+
const statElement = component.root.findByProps({ id: "theStat" });
|
|
49
|
+
const actual = JSON.parse(statElement.props.children);
|
|
50
|
+
assert.deepEqual(actual, expectation, "the status was not as expected");
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
52
|
+
} catch (error) {
|
|
53
|
+
assert.fail(`Element with id "theStat" not found`);
|
|
54
|
+
}
|
|
55
|
+
return component;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
checks: {
|
|
59
|
+
AnEmptyState: () => {
|
|
60
|
+
return { foo: "bar" };
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import test from "../node";
|
|
2
|
+
|
|
3
|
+
import { O } from "../../../../examples/react/component/test";
|
|
4
|
+
import { IProps, IState } from "../../../../examples/react/component";
|
|
5
|
+
import component from "../../../../examples/react/component/index";
|
|
6
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
7
|
+
|
|
8
|
+
import { testImplementation } from "./implementation";
|
|
9
|
+
|
|
10
|
+
export default test<O, IProps, IState>(
|
|
11
|
+
testImplementation,
|
|
12
|
+
specification,
|
|
13
|
+
component
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import test from "../pure";
|
|
2
|
+
|
|
3
|
+
import { O } from "../../../../examples/react/component/test";
|
|
4
|
+
import { IProps, IState } from "../../../../examples/react/component";
|
|
5
|
+
import component from "../../../../examples/react/component/index";
|
|
6
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
7
|
+
|
|
8
|
+
import { testImplementation } from "./implementation";
|
|
9
|
+
|
|
10
|
+
export default test<O, IProps, IState>(
|
|
11
|
+
testImplementation,
|
|
12
|
+
specification,
|
|
13
|
+
component
|
|
14
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import test from "../web";
|
|
2
|
+
|
|
3
|
+
import { O } from "../../../../examples/react/component/test";
|
|
4
|
+
import { IProps, IState } from "../../../../examples/react/component";
|
|
5
|
+
import component from "../../../../examples/react/component/index";
|
|
6
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
7
|
+
|
|
8
|
+
import { testImplementation } from "./implementation";
|
|
9
|
+
|
|
10
|
+
export default test<O, IProps, IState>(
|
|
11
|
+
testImplementation,
|
|
12
|
+
specification,
|
|
13
|
+
component
|
|
14
|
+
);
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
-
import { Ibdd_in, Ibdd_out } from "../../../Types.js";
|
|
2
1
|
import Testeranto from "../../../Web.js";
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { ITestImplementation, ITestSpecification, OT } from "../../../Types.js";
|
|
4
|
+
|
|
5
|
+
import { IInput, I } from "./index.js";
|
|
5
6
|
import { testInterface } from "./interface";
|
|
6
7
|
|
|
7
|
-
export default <
|
|
8
|
-
I
|
|
9
|
-
|
|
10
|
-
unknown,
|
|
11
|
-
unknown,
|
|
12
|
-
unknown,
|
|
13
|
-
unknown,
|
|
14
|
-
unknown,
|
|
15
|
-
unknown
|
|
16
|
-
>,
|
|
17
|
-
O extends Ibdd_out<
|
|
18
|
-
Record<string, any>,
|
|
19
|
-
Record<string, any>,
|
|
20
|
-
Record<string, any>,
|
|
21
|
-
Record<string, any>,
|
|
22
|
-
Record<string, any>
|
|
23
|
-
>
|
|
24
|
-
>(
|
|
25
|
-
testImplementations: IImpl<I, O>,
|
|
26
|
-
testSpecifications: ISpec<I, O>,
|
|
8
|
+
export default <O extends OT, IProps, IState, M = {}>(
|
|
9
|
+
testImplementations: ITestImplementation<I, O, M>,
|
|
10
|
+
testSpecifications: ITestSpecification<I, O>,
|
|
27
11
|
testInput: IInput<any, any>
|
|
28
12
|
) =>
|
|
29
|
-
Testeranto<I, O>(
|
|
13
|
+
Testeranto<I, O, M>(
|
|
30
14
|
testInput,
|
|
31
15
|
testSpecifications,
|
|
32
16
|
testImplementations,
|
|
@@ -1,60 +1,27 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
2
|
+
import renderer, { act, ReactTestRenderer } from "react-test-renderer";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
Ibdd_in,
|
|
6
|
-
Ibdd_out,
|
|
7
|
-
ITestImplementation,
|
|
8
|
-
ITestSpecification,
|
|
9
|
-
} from "../../../Types";
|
|
4
|
+
import { Ibdd_in, IPartialInterface } from "../../../Types";
|
|
10
5
|
|
|
11
6
|
export type IWhenShape = any;
|
|
12
|
-
export type IThenShape =
|
|
7
|
+
export type IThenShape = void;
|
|
13
8
|
export type InitialState = unknown;
|
|
14
9
|
export type IInput = (props?) => JSX.Element;
|
|
15
10
|
export type ISelection = renderer.ReactTestRenderer;
|
|
16
11
|
export type IStore = renderer.ReactTestRenderer;
|
|
17
12
|
export type ISubject = renderer.ReactTestRenderer;
|
|
18
13
|
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
>,
|
|
29
|
-
O extends Ibdd_out<
|
|
30
|
-
Record<string, any>,
|
|
31
|
-
Record<string, any>,
|
|
32
|
-
Record<string, any>,
|
|
33
|
-
Record<string, any>,
|
|
34
|
-
Record<string, any>
|
|
35
|
-
>
|
|
36
|
-
> = ITestImplementation<I, O>;
|
|
14
|
+
export type I = Ibdd_in<
|
|
15
|
+
(props?) => JSX.Element,
|
|
16
|
+
ReactTestRenderer,
|
|
17
|
+
ReactTestRenderer,
|
|
18
|
+
ReactTestRenderer,
|
|
19
|
+
unknown,
|
|
20
|
+
IWhenShape,
|
|
21
|
+
IThenShape
|
|
22
|
+
>;
|
|
37
23
|
|
|
38
|
-
export
|
|
39
|
-
I extends Ibdd_in<
|
|
40
|
-
unknown,
|
|
41
|
-
unknown,
|
|
42
|
-
renderer.ReactTestRenderer,
|
|
43
|
-
unknown,
|
|
44
|
-
unknown,
|
|
45
|
-
unknown,
|
|
46
|
-
unknown
|
|
47
|
-
>,
|
|
48
|
-
O extends Ibdd_out<
|
|
49
|
-
Record<string, any>,
|
|
50
|
-
Record<string, any>,
|
|
51
|
-
Record<string, any>,
|
|
52
|
-
Record<string, any>,
|
|
53
|
-
Record<string, any>
|
|
54
|
-
>
|
|
55
|
-
> = ITestSpecification<I, O>;
|
|
56
|
-
|
|
57
|
-
export const testInterface = {
|
|
24
|
+
export const testInterface: IPartialInterface<I> = {
|
|
58
25
|
butThen: async function (s: IStore, thenCB): Promise<ISelection> {
|
|
59
26
|
// console.log("butThen", thenCB.toString());
|
|
60
27
|
return thenCB(s);
|