testeranto 0.121.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 +9 -0
- package/dist/common/{Init.js → src/Init.js} +1 -32
- package/dist/common/src/Node.js +49 -0
- package/dist/common/src/PM/base.js +230 -0
- package/dist/common/{PM → src/PM}/main.js +300 -233
- package/dist/common/src/PM/node.js +161 -0
- package/dist/common/{PM/node.js → src/PM/pure.js} +27 -18
- package/dist/common/{PM → src/PM}/web.js +14 -47
- package/dist/common/{Node.js → src/Pure.js} +11 -9
- package/dist/common/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +5 -4
- package/dist/common/src/SubPackages/react/component/node.js +10 -0
- package/dist/common/src/SubPackages/react/component/pure.js +10 -0
- package/dist/common/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +2 -2
- package/dist/common/src/SubPackages/react/jsx/index.js +64 -0
- package/dist/common/src/SubPackages/react/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +8 -14
- package/dist/common/src/SubPackages/react-dom/component/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/static.js +26 -0
- package/dist/common/src/SubPackages/react-dom/component/web.js +16 -0
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +31 -0
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +59 -0
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +16 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +15 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +8 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +57 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +10 -0
- package/dist/common/{Web.js → src/Web.js} +1 -4
- package/dist/common/{build.js → src/build.js} +37 -57
- package/dist/common/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/common/src/esbuildConfigs/pure.js +41 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/common/src/examples/react/component/index.js +33 -0
- package/dist/common/src/examples/react/component/test.js +36 -0
- package/dist/common/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/common/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/common/{lib → src/lib}/core.js +5 -43
- package/dist/common/{lib → src/lib}/index.js +1 -1
- package/dist/common/{run.js → src/run.js} +5 -5
- package/dist/common/{utils.js → src/utils.js} +35 -1
- package/dist/common/testeranto.config.js +41 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/{Init.js → src/Init.js} +1 -32
- package/dist/module/src/Node.js +42 -0
- package/dist/module/src/PM/base.js +223 -0
- package/dist/module/{PM → src/PM}/main.js +301 -234
- package/dist/module/src/PM/node.js +154 -0
- package/dist/module/{PM/node.js → src/PM/pure.js} +25 -16
- package/dist/module/{PM → src/PM}/web.js +14 -47
- package/dist/module/{Project.js → src/Project.js} +6 -3
- package/dist/module/{Node.js → src/Pure.js} +9 -7
- package/dist/module/{ReportClient.js → src/ReportClient.js} +1 -1
- package/dist/module/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +3 -4
- package/dist/module/src/SubPackages/react/component/node.js +5 -0
- package/dist/module/src/SubPackages/react/component/pure.js +5 -0
- package/dist/module/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +3 -3
- package/dist/module/src/SubPackages/react/jsx/index.js +58 -0
- package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +5 -13
- package/dist/module/src/SubPackages/react-dom/component/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/static.js +22 -0
- package/dist/module/src/SubPackages/react-dom/component/web.js +11 -0
- package/dist/module/{SubPackages/react-dom/jsx/node.js → src/SubPackages/react-dom/jsx/dynamic.js} +3 -7
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +53 -0
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +11 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +14 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +3 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +54 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +5 -0
- package/dist/module/{TestReport.js → src/TestReport.js} +19 -16
- package/dist/module/{Web.js → src/Web.js} +1 -4
- package/dist/module/{build.js → src/build.js} +37 -57
- package/dist/module/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/module/src/esbuildConfigs/pure.js +36 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/module/src/examples/react/component/index.js +26 -0
- package/dist/module/src/examples/react/component/test.js +32 -0
- package/dist/module/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/module/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/module/{lib → src/lib}/core.js +5 -43
- package/dist/module/{lib → src/lib}/index.js +1 -1
- package/dist/module/{run.js → src/run.js} +5 -5
- package/dist/module/src/utils.js +53 -0
- package/dist/module/testeranto.config.js +39 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +5 -2
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +4 -1
- package/dist/prebuild/build.mjs +115 -65
- package/dist/prebuild/init-docs.mjs +1 -0
- package/dist/prebuild/run.mjs +418 -382
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Node.d.ts +9 -0
- package/dist/types/src/PM/base.d.ts +34 -0
- package/dist/types/{PM → src/PM}/index.d.ts +21 -22
- package/dist/types/{PM → src/PM}/main.d.ts +15 -10
- package/dist/types/src/PM/node.d.ts +38 -0
- package/dist/types/{PM/node.d.ts → src/PM/pure.d.ts} +16 -17
- package/dist/types/{PM → src/PM}/web.d.ts +10 -15
- package/dist/types/src/Pure.d.ts +9 -0
- package/dist/types/src/SubPackages/react/component/index.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +20 -0
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +9 -0
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +11 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +1 -1
- package/dist/types/src/Types.d.ts +88 -0
- package/dist/types/src/Web.d.ts +9 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +2 -1
- package/dist/types/src/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/pure.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/src/examples/react/component/index.d.ts +13 -0
- package/dist/types/src/examples/react/component/test.d.ts +17 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +35 -30
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +7 -8
- package/dist/types/src/lib/classBuilder.d.ts +9 -0
- package/dist/types/src/lib/core.d.ts +7 -0
- package/dist/types/{lib → src/lib}/index.d.ts +14 -36
- package/dist/types/src/lib/types.d.ts +15 -0
- package/dist/types/src/utils.d.ts +18 -0
- package/dist/types/testeranto.config.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/eslint.config.mjs +111 -0
- package/package.json +28 -8
- package/src/Init.ts +1 -39
- package/src/Node.ts +42 -46
- package/src/PM/base.ts +179 -181
- package/src/PM/index.ts +28 -21
- package/src/PM/main.ts +359 -318
- package/src/PM/node.ts +88 -44
- package/src/PM/pure.ts +209 -0
- package/src/PM/web.ts +19 -121
- package/src/Project.tsx +8 -5
- package/src/Pure.ts +69 -0
- package/src/ReportClient.tsx +8 -3
- package/src/SubPackages/react/component/index.ts +28 -0
- package/src/SubPackages/react/component/node.ts +12 -82
- package/src/SubPackages/react/component/pure.ts +17 -0
- package/src/SubPackages/react/component/web.ts +12 -81
- package/src/SubPackages/react/jsx/index.ts +56 -52
- package/src/SubPackages/react/jsx/node.ts +12 -29
- package/src/SubPackages/react/jsx/pure.ts +23 -0
- package/src/SubPackages/react/jsx/web.ts +17 -36
- package/src/SubPackages/react-dom/component/dynamic.ts +107 -0
- package/src/SubPackages/react-dom/component/node.ts +11 -116
- package/src/SubPackages/react-dom/component/pure.ts +17 -0
- package/src/SubPackages/react-dom/component/static.ts +41 -0
- package/src/SubPackages/react-dom/component/web.ts +7 -113
- package/src/SubPackages/react-dom/jsx/dynamic.ts +46 -0
- package/src/SubPackages/react-dom/jsx/node.ts +10 -58
- package/src/SubPackages/react-dom/jsx/pure.ts +18 -0
- package/src/SubPackages/react-dom/jsx/static.ts +87 -0
- package/src/SubPackages/react-dom/jsx/web.ts +7 -135
- package/src/SubPackages/react-test-renderer/component/index.ts +27 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +7 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +7 -25
- package/src/SubPackages/react-test-renderer/component/pure.ts +18 -0
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +63 -0
- package/src/SubPackages/react-test-renderer/component/test/node.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/web.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +7 -23
- package/src/SubPackages/react-test-renderer/jsx/index.ts +13 -46
- package/src/SubPackages/react-test-renderer/jsx/node.ts +9 -15
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +31 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +9 -14
- package/src/TestReport.tsx +7 -4
- package/src/Types.ts +114 -140
- package/src/Web.ts +13 -48
- package/src/build.ts +52 -78
- package/src/defaultConfig.ts +3 -5
- package/src/esbuildConfigs/index.ts +2 -2
- package/src/esbuildConfigs/inputFilesPlugin.ts +2 -1
- package/src/esbuildConfigs/node.ts +7 -5
- package/src/esbuildConfigs/pure.ts +72 -0
- package/src/esbuildConfigs/web.ts +8 -5
- package/src/examples/react/component/index.tsx +35 -0
- package/src/examples/react/component/test.ts +83 -0
- package/src/lib/abstractBase.ts +100 -192
- package/src/lib/basebuilder.ts +40 -40
- package/src/lib/classBuilder.ts +18 -26
- package/src/lib/core.ts +22 -77
- package/src/lib/index.ts +31 -66
- package/src/lib/types.ts +20 -90
- package/src/run.ts +3 -6
- package/src/utils.ts +50 -5
- package/testeranto/Project.css +11367 -0
- package/testeranto/Project.js +24643 -0
- package/testeranto/ReportClient.css +11367 -0
- package/testeranto/ReportClient.js +24641 -0
- package/testeranto/TestReport.css +11367 -0
- package/testeranto/TestReport.js +27485 -0
- package/testeranto/bundles/node/react/metafile.json +627 -0
- package/testeranto/bundles/node/react/src/SubPackages/react-test-renderer/component/test/node.mjs +24687 -0
- package/testeranto/bundles/pure/react/metafile.json +8 -0
- package/testeranto/bundles/pure/react/src/SubPackages/react-test-renderer/component/test/pure.mjs +24625 -0
- package/testeranto/bundles/web/react/metafile.json +8 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.html +19 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.mjs +21290 -0
- package/testeranto/index.html +28 -0
- package/testeranto/reports/react/config.json +22 -0
- package/testeranto/reports/react/index.html +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/node/node/console_log.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/featurePrompt.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/lint_errors.json +3381 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/prompt.txt +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/type_errors.txt +17 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/console_log.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/lint_errors.json +2947 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/prompt.txt +23 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/type_errors.txt +18 -0
- package/testeranto/reports/react/summary.json +8 -0
- package/testeranto.config.ts +45 -0
- package/tsc.log +52 -64
- package/type-fix.txt +2 -0
- package/dist/common/PM/base.js +0 -233
- package/dist/common/SubPackages/react/component/node.js +0 -19
- package/dist/common/SubPackages/react/jsx/index.js +0 -21
- package/dist/common/SubPackages/react-dom/component/node.js +0 -88
- package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
- package/dist/module/PM/base.js +0 -226
- package/dist/module/SubPackages/react/component/node.js +0 -14
- package/dist/module/SubPackages/react/jsx/index.js +0 -15
- package/dist/module/SubPackages/react-dom/component/node.js +0 -80
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/utils.js +0 -20
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/base.d.ts +0 -38
- package/dist/types/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
- package/dist/types/Types.d.ts +0 -61
- package/dist/types/Web.d.ts +0 -9
- package/dist/types/defaultConfig.d.ts +0 -3
- package/dist/types/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/lib/classBuilder.d.ts +0 -7
- package/dist/types/lib/core.d.ts +0 -7
- package/dist/types/lib/types.d.ts +0 -11
- package/dist/types/utils.d.ts +0 -12
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/common/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Footer.js → src/Footer.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/module/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{ReportServer.d.ts → src/ReportServer.d.ts} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{build.d.ts → src/build.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{init-docs.d.ts → src/init-docs.d.ts} +0 -0
- /package/dist/types/{run.d.ts → src/run.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Web_js_1 = __importDefault(require("../../../Web.js"));
|
|
7
|
+
exports.default = (testInput, testSpecifications, testImplementations, testInterface) => {
|
|
8
|
+
const t = (0, Web_js_1.default)(testInput, testSpecifications, testImplementations, testInterface);
|
|
9
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
10
|
+
const elem = document.getElementById("root");
|
|
11
|
+
if (elem) {
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testInterfacer = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const testInterfacer = (testInput) => {
|
|
6
|
+
return {
|
|
7
|
+
beforeAll: async (prototype, artificer) => {
|
|
8
|
+
return await new Promise((resolve, rej) => {
|
|
9
|
+
resolve(null);
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
beforeEach: async () => {
|
|
13
|
+
return new Promise((resolve, rej) => {
|
|
14
|
+
resolve((0, react_1.createElement)(testInput));
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
andWhen: async function (s, whenCB) {
|
|
18
|
+
return s;
|
|
19
|
+
},
|
|
20
|
+
butThen: async function (s) {
|
|
21
|
+
return s;
|
|
22
|
+
},
|
|
23
|
+
afterEach: async function (store, ndx, artificer) {
|
|
24
|
+
return {};
|
|
25
|
+
},
|
|
26
|
+
afterAll: (store, artificer) => {
|
|
27
|
+
return;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.testInterfacer = testInterfacer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Node_js_1 = __importDefault(require("../../../Node.js"));
|
|
7
|
+
const static_js_1 = require("./static.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
return (0, Node_js_1.default)(testInput, testSpecifications, testImplementations, static_js_1.testInterface);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const static_js_1 = require("./static.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
return (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, static_js_1.testInterface);
|
|
10
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.testInterface = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_2 = __importDefault(require("react"));
|
|
9
|
+
const client_1 = __importDefault(require("react-dom/client"));
|
|
10
|
+
const TesterantoComponent = ({ done, innerComp, }) => {
|
|
11
|
+
const myContainer = (0, react_1.useRef)(null);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
done(myContainer.current);
|
|
14
|
+
}, []);
|
|
15
|
+
return react_2.default.createElement("div", { ref: myContainer }, innerComp());
|
|
16
|
+
};
|
|
17
|
+
exports.testInterface = {
|
|
18
|
+
beforeAll: async (reactElement, itr) => {
|
|
19
|
+
return await new Promise((resolve, rej) => {
|
|
20
|
+
const htmlElement = document.getElementById("root");
|
|
21
|
+
if (htmlElement) {
|
|
22
|
+
const domRoot = client_1.default.createRoot(htmlElement);
|
|
23
|
+
domRoot.render((0, react_1.createElement)(TesterantoComponent, {
|
|
24
|
+
// ...initialProps,
|
|
25
|
+
innerComp: reactElement,
|
|
26
|
+
done: (reactElement) => {
|
|
27
|
+
resolve({
|
|
28
|
+
htmlElement,
|
|
29
|
+
reactElement,
|
|
30
|
+
domRoot,
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
}, []));
|
|
34
|
+
// resolve({ htmlElement });
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
beforeEach: async (subject) => {
|
|
39
|
+
return subject;
|
|
40
|
+
},
|
|
41
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
42
|
+
return whenCB(s, utils);
|
|
43
|
+
},
|
|
44
|
+
butThen: async function (s, thenCB, tr, utils) {
|
|
45
|
+
return new Promise((resolve, rej) => {
|
|
46
|
+
resolve(thenCB(s, utils));
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
afterEach: async function (store, ndx, artificer) {
|
|
50
|
+
return new Promise((resolve, rej) => {
|
|
51
|
+
resolve({});
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
afterAll: (store, artificer) => {
|
|
55
|
+
return new Promise((resolve, rej) => {
|
|
56
|
+
resolve({});
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Web_js_1 = __importDefault(require("../../../Web.js"));
|
|
7
|
+
const dynamic_js_1 = require("./dynamic.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
const t = (0, Web_js_1.default)(testInput, testSpecifications, testImplementations, (0, dynamic_js_1.testInterfacer)(testInput));
|
|
10
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
11
|
+
const rootElement = document.getElementById("root");
|
|
12
|
+
if (rootElement) {
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type ISuper<T> = T extends infer U ? U : object;
|
|
4
|
+
// export type InitialState = unknown;
|
|
5
|
+
// export type IWhenShape = any;
|
|
6
|
+
// export type IThenShape = any;
|
|
7
|
+
// export type ISelection = renderer.ReactTestRenderer;
|
|
8
|
+
// export type IStore = renderer.ReactTestRenderer;
|
|
9
|
+
// export type ISubject = renderer.ReactTestRenderer;
|
|
10
|
+
// export type IImpl<I extends IT, O extends OT, M> = ITestImplementation<I, O>;
|
|
11
|
+
// export type ITestSpecification<
|
|
12
|
+
// I extends IT,
|
|
13
|
+
// O extends OT,
|
|
14
|
+
// M
|
|
15
|
+
// > = ITestSpecification<I, O>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const interface_1 = require("./interface");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, interface_1.testInterface);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { ITestImplementation } from "testeranto/src/Types";
|
|
3
|
+
// import { I } from "testeranto/src/SubPackages/react-test-renderer/component";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.testImplementation = void 0;
|
|
6
|
+
const chai_1 = require("chai");
|
|
7
|
+
exports.testImplementation = {
|
|
8
|
+
suites: {
|
|
9
|
+
Default: "default",
|
|
10
|
+
},
|
|
11
|
+
givens: {
|
|
12
|
+
AnEmptyState: () => {
|
|
13
|
+
return { foo: "bar" };
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
whens: {
|
|
17
|
+
IClickTheButton: () => async (component) => {
|
|
18
|
+
const button = component.root.findByType("button");
|
|
19
|
+
button.props.onClick();
|
|
20
|
+
return component;
|
|
21
|
+
},
|
|
22
|
+
IClickTheHeader: () => async (component) => {
|
|
23
|
+
try {
|
|
24
|
+
const header = component.root.findByType("h1");
|
|
25
|
+
header.props.onClick();
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
// Expected error - header click fails
|
|
30
|
+
}
|
|
31
|
+
return component;
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
thens: {
|
|
35
|
+
ThePropsIs: (expectation) => (component) => {
|
|
36
|
+
const propsElement = component.root.findByProps({ id: "theProps" });
|
|
37
|
+
return chai_1.assert.deepEqual(JSON.parse(propsElement.props.children), expectation);
|
|
38
|
+
},
|
|
39
|
+
TheStatusIs: (expectation) => (component) => {
|
|
40
|
+
try {
|
|
41
|
+
const statElement = component.root.findByProps({ id: "theStat" });
|
|
42
|
+
const actual = JSON.parse(statElement.props.children);
|
|
43
|
+
chai_1.assert.deepEqual(actual, expectation, "the status was not as expected");
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
chai_1.assert.fail(`Element with id "theStat" not found`);
|
|
48
|
+
}
|
|
49
|
+
return component;
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
checks: {
|
|
53
|
+
AnEmptyState: () => {
|
|
54
|
+
return { foo: "bar" };
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const node_1 = __importDefault(require("../node"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, node_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const pure_1 = __importDefault(require("../pure"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, pure_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const web_1 = __importDefault(require("../web"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, web_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const index_js_1 = require("./index.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput, testInterface2 = index_js_1.testInterface) => {
|
|
9
|
+
return (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, testInterface2);
|
|
10
|
+
};
|
|
@@ -37,10 +37,7 @@ class WebTesteranto extends core_js_1.default {
|
|
|
37
37
|
async receiveTestResourceConfig(partialTestResource) {
|
|
38
38
|
const t = partialTestResource; //JSON.parse(partialTestResource);
|
|
39
39
|
const pm = new web_1.PM_Web(t);
|
|
40
|
-
|
|
41
|
-
return new Promise((res, rej) => {
|
|
42
|
-
res({ features, failed });
|
|
43
|
-
});
|
|
40
|
+
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
exports.WebTesteranto = WebTesteranto;
|
|
@@ -40,11 +40,12 @@ const ansi_colors_1 = __importDefault(require("ansi-colors"));
|
|
|
40
40
|
const fs_1 = __importDefault(require("fs"));
|
|
41
41
|
const path_1 = __importDefault(require("path"));
|
|
42
42
|
const readline_1 = __importDefault(require("readline"));
|
|
43
|
-
const glob_1 = require("glob");
|
|
44
43
|
const esbuild_1 = __importDefault(require("esbuild"));
|
|
45
44
|
const node_js_1 = __importDefault(require("./esbuildConfigs/node.js"));
|
|
46
45
|
const web_js_1 = __importDefault(require("./esbuildConfigs/web.js"));
|
|
46
|
+
const pure_js_1 = __importDefault(require("./esbuildConfigs/pure.js"));
|
|
47
47
|
const web_html_js_1 = __importDefault(require("./web.html.js"));
|
|
48
|
+
const utils_js_1 = require("./utils.js");
|
|
48
49
|
readline_1.default.emitKeypressEvents(process.stdin);
|
|
49
50
|
if (process.stdin.isTTY)
|
|
50
51
|
process.stdin.setRawMode(true);
|
|
@@ -95,8 +96,9 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
95
96
|
});
|
|
96
97
|
let nodeDone = false;
|
|
97
98
|
let webDone = false;
|
|
99
|
+
let importDone = false;
|
|
98
100
|
let status = "build";
|
|
99
|
-
const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
|
|
101
|
+
const { nodeEntryPoints, webEntryPoints, importEntryPoints } = (0, utils_js_1.getRunnables)(config.tests, testName);
|
|
100
102
|
const onNodeDone = () => {
|
|
101
103
|
nodeDone = true;
|
|
102
104
|
onDone();
|
|
@@ -105,11 +107,15 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
105
107
|
webDone = true;
|
|
106
108
|
onDone();
|
|
107
109
|
};
|
|
110
|
+
const onImportDone = () => {
|
|
111
|
+
importDone = true;
|
|
112
|
+
onDone();
|
|
113
|
+
};
|
|
108
114
|
const onDone = async () => {
|
|
109
|
-
if (nodeDone && webDone) {
|
|
115
|
+
if (nodeDone && webDone && importDone) {
|
|
110
116
|
status = "built";
|
|
111
117
|
}
|
|
112
|
-
if (nodeDone && webDone && mode === "once") {
|
|
118
|
+
if (nodeDone && webDone && importDone && mode === "once") {
|
|
113
119
|
console.log(ansi_colors_1.default.inverse(`${testName} has been built. Goodbye.`));
|
|
114
120
|
process.exit();
|
|
115
121
|
}
|
|
@@ -184,60 +190,34 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
184
190
|
.mkdir(path_1.default.dirname(htmlFilePath), { recursive: true })
|
|
185
191
|
.then((x) => fs_1.default.writeFileSync(htmlFilePath, (0, web_html_js_1.default)(jsfilePath, htmlFilePath)));
|
|
186
192
|
})));
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}).then((chunks) => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
});
|
|
193
|
+
// glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
194
|
+
// ignore: "node_modules/**",
|
|
195
|
+
// }).then((chunks) => {
|
|
196
|
+
// chunks.forEach((chunk) => {
|
|
197
|
+
// fs.unlinkSync(chunk);
|
|
198
|
+
// });
|
|
199
|
+
// });
|
|
194
200
|
await Promise.all([
|
|
195
|
-
|
|
196
|
-
.
|
|
197
|
-
.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
onWebDone();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
webContext.rebuild().then((v) => {
|
|
220
|
-
onWebDone();
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
return webContext;
|
|
201
|
+
...[
|
|
202
|
+
[pure_js_1.default, importEntryPoints, onImportDone],
|
|
203
|
+
[node_js_1.default, nodeEntryPoints, onNodeDone],
|
|
204
|
+
[web_js_1.default, webEntryPoints, onWebDone],
|
|
205
|
+
].map(([configer, entryPoints, done]) => {
|
|
206
|
+
esbuild_1.default
|
|
207
|
+
.context(configer(config, Object.keys(entryPoints), testName))
|
|
208
|
+
.then(async (ctx) => {
|
|
209
|
+
if (mode === "dev") {
|
|
210
|
+
await ctx.watch().then((v) => {
|
|
211
|
+
done();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
ctx.rebuild().then((v) => {
|
|
216
|
+
done();
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
return ctx;
|
|
220
|
+
});
|
|
224
221
|
}),
|
|
225
222
|
]);
|
|
226
223
|
});
|
|
227
|
-
const getRunnables = (tests, payload = {
|
|
228
|
-
nodeEntryPoints: {},
|
|
229
|
-
webEntryPoints: {},
|
|
230
|
-
}) => {
|
|
231
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
232
|
-
if (cv[1] === "node") {
|
|
233
|
-
pt.nodeEntryPoints[cv[0]] = path_1.default.resolve(`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
234
|
-
}
|
|
235
|
-
else if (cv[1] === "web") {
|
|
236
|
-
pt.webEntryPoints[cv[0]] = path_1.default.resolve(`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
237
|
-
}
|
|
238
|
-
if (cv[3].length) {
|
|
239
|
-
getRunnables(cv[3], payload);
|
|
240
|
-
}
|
|
241
|
-
return pt;
|
|
242
|
-
}, payload);
|
|
243
|
-
};
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const config = {
|
|
4
4
|
src: "src",
|
|
5
|
-
// outdir: "docs",
|
|
6
5
|
tests: [],
|
|
7
6
|
debugger: true,
|
|
8
7
|
clearScreen: false,
|
|
9
|
-
devMode: true,
|
|
10
8
|
minify: false,
|
|
11
|
-
// outbase: ".",
|
|
12
9
|
ports: ["3001"],
|
|
13
10
|
externals: [],
|
|
14
11
|
nodePlugins: [],
|
|
15
12
|
webPlugins: [],
|
|
13
|
+
importPlugins: [],
|
|
16
14
|
featureIngestor: function (s) {
|
|
17
15
|
throw new Error("Function not implemented.");
|
|
18
16
|
},
|
|
@@ -7,9 +7,7 @@ const index_js_1 = __importDefault(require("./index.js"));
|
|
|
7
7
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
|
|
9
9
|
exports.default = (config, entryPoints, testName) => {
|
|
10
|
-
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node",
|
|
11
|
-
// entryPoints,
|
|
12
|
-
testName);
|
|
10
|
+
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", testName);
|
|
13
11
|
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
14
12
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
15
13
|
metafile: true, supported: {
|
|
@@ -23,7 +21,10 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
23
21
|
inputFilesPluginFactory,
|
|
24
22
|
{
|
|
25
23
|
name: "rebuild-notify",
|
|
26
|
-
setup(build) {
|
|
24
|
+
setup: (build) => {
|
|
25
|
+
build.onStart(() => {
|
|
26
|
+
console.log(`> node build starting...`);
|
|
27
|
+
});
|
|
27
28
|
build.onEnd((result) => {
|
|
28
29
|
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
29
30
|
if (result.errors.length > 0) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
|
+
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
|
+
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
9
|
+
exports.default = (config, entryPoints, testName) => {
|
|
10
|
+
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("pure", testName);
|
|
11
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { drop: ["console", "debugger"], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
12
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
13
|
+
metafile: true, supported: {
|
|
14
|
+
"dynamic-import": true,
|
|
15
|
+
}, define: {
|
|
16
|
+
"process.env.FLUENTFFMPEG_COV": "0",
|
|
17
|
+
}, absWorkingDir: process.cwd(), banner: {
|
|
18
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
19
|
+
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
|
+
featuresPlugin_js_1.default,
|
|
21
|
+
inputFilesPluginFactory,
|
|
22
|
+
{
|
|
23
|
+
name: "rebuild-notify",
|
|
24
|
+
setup: (build) => {
|
|
25
|
+
build.onStart(() => {
|
|
26
|
+
console.log(`> pure build starting...`);
|
|
27
|
+
});
|
|
28
|
+
build.onEnd((result) => {
|
|
29
|
+
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
30
|
+
if (result.errors.length > 0) {
|
|
31
|
+
console.log(result);
|
|
32
|
+
}
|
|
33
|
+
// console.log(result);
|
|
34
|
+
// result.errors.length !== 0 && process.exit(-1);
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
39
|
+
[]),
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
@@ -34,7 +34,10 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
34
34
|
inputFilesPluginFactory,
|
|
35
35
|
{
|
|
36
36
|
name: "rebuild-notify",
|
|
37
|
-
setup(build) {
|
|
37
|
+
setup: (build) => {
|
|
38
|
+
build.onStart(() => {
|
|
39
|
+
console.log(`> web build starting...`);
|
|
40
|
+
});
|
|
38
41
|
build.onEnd((result) => {
|
|
39
42
|
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
40
43
|
if (result.errors.length > 0) {
|
|
@@ -45,6 +48,6 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
45
48
|
});
|
|
46
49
|
},
|
|
47
50
|
},
|
|
48
|
-
...(config.
|
|
51
|
+
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
49
52
|
] });
|
|
50
53
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ClassicalComponent = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
class ClassicalComponent extends react_1.default.Component {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.state = {
|
|
12
|
+
count: 0,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (react_1.default.createElement("div", { style: { border: "3px solid black" } },
|
|
17
|
+
react_1.default.createElement("h1", { id: "theHeader" }, "Hello Marcus"),
|
|
18
|
+
react_1.default.createElement("pre", { id: "theProps" }, JSON.stringify(this.props)),
|
|
19
|
+
react_1.default.createElement("p", null,
|
|
20
|
+
"foo: ",
|
|
21
|
+
this.props.foo),
|
|
22
|
+
react_1.default.createElement("pre", { id: "theStat" }, JSON.stringify(this.state)),
|
|
23
|
+
react_1.default.createElement("p", null,
|
|
24
|
+
"count: ",
|
|
25
|
+
this.state.count,
|
|
26
|
+
" times"),
|
|
27
|
+
react_1.default.createElement("button", { id: "theButton", onClick: async () => {
|
|
28
|
+
this.setState({ count: this.state.count + 1 });
|
|
29
|
+
} }, "Click")));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ClassicalComponent = ClassicalComponent;
|
|
33
|
+
exports.default = ClassicalComponent;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.specification = void 0;
|
|
4
|
+
const specification = (Suite, Given, When, Then) => {
|
|
5
|
+
return [
|
|
6
|
+
Suite.Default("a classical react component", {
|
|
7
|
+
test0: Given.AnEmptyState([`I click 4 times and the count is 3`], [
|
|
8
|
+
When.IClickTheButton(),
|
|
9
|
+
When.IClickTheButton(),
|
|
10
|
+
When.IClickTheButton(),
|
|
11
|
+
When.IClickTheHeader(),
|
|
12
|
+
// When.IClickTheButton(),
|
|
13
|
+
], [
|
|
14
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
15
|
+
Then.TheStatusIs({ count: 3 }),
|
|
16
|
+
]),
|
|
17
|
+
test1: Given.AnEmptyState([`Count is 1 by default`], [When.IClickTheButton()], [
|
|
18
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
19
|
+
Then.TheStatusIs({ count: 1 }),
|
|
20
|
+
]),
|
|
21
|
+
test2: Given.AnEmptyState([`0`], [
|
|
22
|
+
When.IClickTheButton(),
|
|
23
|
+
When.IClickTheButton(),
|
|
24
|
+
When.IClickTheButton(),
|
|
25
|
+
When.IClickTheButton(),
|
|
26
|
+
When.IClickTheButton(),
|
|
27
|
+
When.IClickTheButton(),
|
|
28
|
+
When.IClickTheButton(),
|
|
29
|
+
When.IClickTheButton(),
|
|
30
|
+
When.IClickTheButton(),
|
|
31
|
+
], [Then.TheStatusIs({ count: 9 })]),
|
|
32
|
+
test3: Given.AnEmptyState([`0`], [When.IClickTheButton(), When.IClickTheButton()], [Then.TheStatusIs({ count: 2 })]),
|
|
33
|
+
}, []),
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
exports.specification = specification;
|