testeranto 0.121.1 → 0.125.1
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 +32 -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,53 @@
|
|
|
1
|
+
import { createElement, useEffect, useRef } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDom from "react-dom/client";
|
|
4
|
+
const TesterantoComponent = ({ done, innerComp, }) => {
|
|
5
|
+
const myContainer = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
done(myContainer.current);
|
|
8
|
+
}, []);
|
|
9
|
+
return React.createElement("div", { ref: myContainer }, innerComp());
|
|
10
|
+
};
|
|
11
|
+
export const testInterface = {
|
|
12
|
+
beforeAll: async (reactElement, itr) => {
|
|
13
|
+
return await new Promise((resolve, rej) => {
|
|
14
|
+
const htmlElement = document.getElementById("root");
|
|
15
|
+
if (htmlElement) {
|
|
16
|
+
const domRoot = ReactDom.createRoot(htmlElement);
|
|
17
|
+
domRoot.render(createElement(TesterantoComponent, {
|
|
18
|
+
// ...initialProps,
|
|
19
|
+
innerComp: reactElement,
|
|
20
|
+
done: (reactElement) => {
|
|
21
|
+
resolve({
|
|
22
|
+
htmlElement,
|
|
23
|
+
reactElement,
|
|
24
|
+
domRoot,
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
}, []));
|
|
28
|
+
// resolve({ htmlElement });
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
beforeEach: async (subject) => {
|
|
33
|
+
return subject;
|
|
34
|
+
},
|
|
35
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
36
|
+
return whenCB(s, utils);
|
|
37
|
+
},
|
|
38
|
+
butThen: async function (s, thenCB, tr, utils) {
|
|
39
|
+
return new Promise((resolve, rej) => {
|
|
40
|
+
resolve(thenCB(s, utils));
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
afterEach: async function (store, ndx, artificer) {
|
|
44
|
+
return new Promise((resolve, rej) => {
|
|
45
|
+
resolve({});
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
afterAll: (store, artificer) => {
|
|
49
|
+
return new Promise((resolve, rej) => {
|
|
50
|
+
resolve({});
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Testeranto from "../../../Web.js";
|
|
2
|
+
import { testInterfacer } from "./dynamic.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput) => {
|
|
4
|
+
const t = Testeranto(testInput, testSpecifications, testImplementations, testInterfacer(testInput));
|
|
5
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
6
|
+
const rootElement = document.getElementById("root");
|
|
7
|
+
if (rootElement) {
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// export type ISuper<T> = T extends infer U ? U : object;
|
|
3
|
+
// export type InitialState = unknown;
|
|
4
|
+
// export type IWhenShape = any;
|
|
5
|
+
// export type IThenShape = any;
|
|
6
|
+
// export type ISelection = renderer.ReactTestRenderer;
|
|
7
|
+
// export type IStore = renderer.ReactTestRenderer;
|
|
8
|
+
// export type ISubject = renderer.ReactTestRenderer;
|
|
9
|
+
// export type IImpl<I extends IT, O extends OT, M> = ITestImplementation<I, O>;
|
|
10
|
+
// export type ITestSpecification<
|
|
11
|
+
// I extends IT,
|
|
12
|
+
// O extends OT,
|
|
13
|
+
// M
|
|
14
|
+
// > = ITestSpecification<I, O>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// import { ITestImplementation } from "testeranto/src/Types";
|
|
2
|
+
// import { I } from "testeranto/src/SubPackages/react-test-renderer/component";
|
|
3
|
+
import { assert } from "chai";
|
|
4
|
+
export const testImplementation = {
|
|
5
|
+
suites: {
|
|
6
|
+
Default: "default",
|
|
7
|
+
},
|
|
8
|
+
givens: {
|
|
9
|
+
AnEmptyState: () => {
|
|
10
|
+
return { foo: "bar" };
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
whens: {
|
|
14
|
+
IClickTheButton: () => async (component) => {
|
|
15
|
+
const button = component.root.findByType("button");
|
|
16
|
+
button.props.onClick();
|
|
17
|
+
return component;
|
|
18
|
+
},
|
|
19
|
+
IClickTheHeader: () => async (component) => {
|
|
20
|
+
try {
|
|
21
|
+
const header = component.root.findByType("h1");
|
|
22
|
+
header.props.onClick();
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
// Expected error - header click fails
|
|
27
|
+
}
|
|
28
|
+
return component;
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
thens: {
|
|
32
|
+
ThePropsIs: (expectation) => (component) => {
|
|
33
|
+
const propsElement = component.root.findByProps({ id: "theProps" });
|
|
34
|
+
return assert.deepEqual(JSON.parse(propsElement.props.children), expectation);
|
|
35
|
+
},
|
|
36
|
+
TheStatusIs: (expectation) => (component) => {
|
|
37
|
+
try {
|
|
38
|
+
const statElement = component.root.findByProps({ id: "theStat" });
|
|
39
|
+
const actual = JSON.parse(statElement.props.children);
|
|
40
|
+
assert.deepEqual(actual, expectation, "the status was not as expected");
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
assert.fail(`Element with id "theStat" not found`);
|
|
45
|
+
}
|
|
46
|
+
return component;
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
checks: {
|
|
50
|
+
AnEmptyState: () => {
|
|
51
|
+
return { foo: "bar" };
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import test from "../node";
|
|
2
|
+
import component from "../../../../examples/react/component/index";
|
|
3
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
4
|
+
import { testImplementation } from "./implementation";
|
|
5
|
+
export default test(testImplementation, specification, component);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import test from "../pure";
|
|
2
|
+
import component from "../../../../examples/react/component/index";
|
|
3
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
4
|
+
import { testImplementation } from "./implementation";
|
|
5
|
+
export default test(testImplementation, specification, component);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import test from "../web";
|
|
2
|
+
import component from "../../../../examples/react/component/index";
|
|
3
|
+
import { specification } from "../../../../examples/react/component/test";
|
|
4
|
+
import { testImplementation } from "./implementation";
|
|
5
|
+
export default test(testImplementation, specification, component);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import test from "../../../Pure.js";
|
|
2
|
+
import { testInterface } from "./index.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput, testInterface2 = testInterface) => {
|
|
4
|
+
return test(testInput, testSpecifications, testImplementations, testInterface2);
|
|
5
|
+
};
|
|
@@ -9,7 +9,7 @@ const StepPane = ({ step }) => {
|
|
|
9
9
|
React.createElement("pre", null,
|
|
10
10
|
React.createElement("code", null, JSON.stringify(step, null, 2))));
|
|
11
11
|
};
|
|
12
|
-
const TestPane = ({ given
|
|
12
|
+
const TestPane = ({ given }) => {
|
|
13
13
|
return React.createElement("div", null,
|
|
14
14
|
" ",
|
|
15
15
|
React.createElement(Tab.Container, { id: "TestPane-tabs", defaultActiveKey: "first" },
|
|
@@ -43,30 +43,30 @@ const TestPane = ({ given, log }) => {
|
|
|
43
43
|
React.createElement("code", null, JSON.stringify(given.error, null, 2)))))))));
|
|
44
44
|
};
|
|
45
45
|
const BddPage = () => {
|
|
46
|
-
const [configs, setConfigs] = useState();
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, []);
|
|
46
|
+
// const [configs, setConfigs] = useState<IBuiltConfig>();
|
|
47
|
+
// useEffect(() => {
|
|
48
|
+
// (async () => {
|
|
49
|
+
// fetch('../config.json')
|
|
50
|
+
// .then(response => response.json())
|
|
51
|
+
// .then(json => {
|
|
52
|
+
// setConfigs(json)
|
|
53
|
+
// })
|
|
54
|
+
// .catch(error => console.error(error));
|
|
55
|
+
// })();
|
|
56
|
+
// }, []);
|
|
57
57
|
const [bddErrors, setBddErrors] = useState();
|
|
58
58
|
useEffect(() => {
|
|
59
59
|
(async () => {
|
|
60
60
|
setBddErrors(await (await fetch(`tests.json`)).json());
|
|
61
61
|
})();
|
|
62
|
-
}, [
|
|
62
|
+
}, []);
|
|
63
63
|
const [log, setLog] = useState();
|
|
64
64
|
useEffect(() => {
|
|
65
65
|
(async () => {
|
|
66
66
|
setLog(await (await fetch(`log.txt`)).text());
|
|
67
67
|
})();
|
|
68
|
-
}, [
|
|
69
|
-
if (!
|
|
68
|
+
}, []);
|
|
69
|
+
if (!bddErrors || !log) {
|
|
70
70
|
return React.createElement("div", null, "loading...");
|
|
71
71
|
}
|
|
72
72
|
return React.createElement("div", null,
|
|
@@ -94,7 +94,10 @@ const BddPage = () => {
|
|
|
94
94
|
document.addEventListener("DOMContentLoaded", function () {
|
|
95
95
|
const elem = document.getElementById("root");
|
|
96
96
|
if (elem) {
|
|
97
|
-
|
|
97
|
+
if (elem) {
|
|
98
|
+
const root = ReactDom.createRoot(elem);
|
|
99
|
+
root.render(React.createElement(BddPage, {}));
|
|
100
|
+
}
|
|
98
101
|
}
|
|
99
102
|
});
|
|
100
103
|
console.log("hello BddPage!");
|
|
@@ -31,10 +31,7 @@ export class WebTesteranto extends Testeranto {
|
|
|
31
31
|
async receiveTestResourceConfig(partialTestResource) {
|
|
32
32
|
const t = partialTestResource; //JSON.parse(partialTestResource);
|
|
33
33
|
const pm = new PM_Web(t);
|
|
34
|
-
|
|
35
|
-
return new Promise((res, rej) => {
|
|
36
|
-
res({ features, failed });
|
|
37
|
-
});
|
|
34
|
+
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
export default async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = defaultTestResourceRequirement) => {
|
|
@@ -2,11 +2,12 @@ import ansiC from "ansi-colors";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import readline from "readline";
|
|
5
|
-
import { glob } from "glob";
|
|
6
5
|
import esbuild from "esbuild";
|
|
7
6
|
import esbuildNodeConfiger from "./esbuildConfigs/node.js";
|
|
8
7
|
import esbuildWebConfiger from "./esbuildConfigs/web.js";
|
|
8
|
+
import esbuildImportConfiger from "./esbuildConfigs/pure.js";
|
|
9
9
|
import webHtmlFrame from "./web.html.js";
|
|
10
|
+
import { getRunnables } from "./utils.js";
|
|
10
11
|
readline.emitKeypressEvents(process.stdin);
|
|
11
12
|
if (process.stdin.isTTY)
|
|
12
13
|
process.stdin.setRawMode(true);
|
|
@@ -57,8 +58,9 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
57
58
|
});
|
|
58
59
|
let nodeDone = false;
|
|
59
60
|
let webDone = false;
|
|
61
|
+
let importDone = false;
|
|
60
62
|
let status = "build";
|
|
61
|
-
const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
|
|
63
|
+
const { nodeEntryPoints, webEntryPoints, importEntryPoints } = getRunnables(config.tests, testName);
|
|
62
64
|
const onNodeDone = () => {
|
|
63
65
|
nodeDone = true;
|
|
64
66
|
onDone();
|
|
@@ -67,11 +69,15 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
67
69
|
webDone = true;
|
|
68
70
|
onDone();
|
|
69
71
|
};
|
|
72
|
+
const onImportDone = () => {
|
|
73
|
+
importDone = true;
|
|
74
|
+
onDone();
|
|
75
|
+
};
|
|
70
76
|
const onDone = async () => {
|
|
71
|
-
if (nodeDone && webDone) {
|
|
77
|
+
if (nodeDone && webDone && importDone) {
|
|
72
78
|
status = "built";
|
|
73
79
|
}
|
|
74
|
-
if (nodeDone && webDone && mode === "once") {
|
|
80
|
+
if (nodeDone && webDone && importDone && mode === "once") {
|
|
75
81
|
console.log(ansiC.inverse(`${testName} has been built. Goodbye.`));
|
|
76
82
|
process.exit();
|
|
77
83
|
}
|
|
@@ -146,60 +152,34 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
146
152
|
.mkdir(path.dirname(htmlFilePath), { recursive: true })
|
|
147
153
|
.then((x) => fs.writeFileSync(htmlFilePath, webHtmlFrame(jsfilePath, htmlFilePath)));
|
|
148
154
|
})));
|
|
149
|
-
glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
150
|
-
|
|
151
|
-
}).then((chunks) => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
155
|
+
// glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
156
|
+
// ignore: "node_modules/**",
|
|
157
|
+
// }).then((chunks) => {
|
|
158
|
+
// chunks.forEach((chunk) => {
|
|
159
|
+
// fs.unlinkSync(chunk);
|
|
160
|
+
// });
|
|
161
|
+
// });
|
|
156
162
|
await Promise.all([
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
onWebDone();
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
webContext.rebuild().then((v) => {
|
|
182
|
-
onWebDone();
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
return webContext;
|
|
163
|
+
...[
|
|
164
|
+
[esbuildImportConfiger, importEntryPoints, onImportDone],
|
|
165
|
+
[esbuildNodeConfiger, nodeEntryPoints, onNodeDone],
|
|
166
|
+
[esbuildWebConfiger, webEntryPoints, onWebDone],
|
|
167
|
+
].map(([configer, entryPoints, done]) => {
|
|
168
|
+
esbuild
|
|
169
|
+
.context(configer(config, Object.keys(entryPoints), testName))
|
|
170
|
+
.then(async (ctx) => {
|
|
171
|
+
if (mode === "dev") {
|
|
172
|
+
await ctx.watch().then((v) => {
|
|
173
|
+
done();
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
ctx.rebuild().then((v) => {
|
|
178
|
+
done();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return ctx;
|
|
182
|
+
});
|
|
186
183
|
}),
|
|
187
184
|
]);
|
|
188
185
|
});
|
|
189
|
-
const getRunnables = (tests, payload = {
|
|
190
|
-
nodeEntryPoints: {},
|
|
191
|
-
webEntryPoints: {},
|
|
192
|
-
}) => {
|
|
193
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
194
|
-
if (cv[1] === "node") {
|
|
195
|
-
pt.nodeEntryPoints[cv[0]] = path.resolve(`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
196
|
-
}
|
|
197
|
-
else if (cv[1] === "web") {
|
|
198
|
-
pt.webEntryPoints[cv[0]] = path.resolve(`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
199
|
-
}
|
|
200
|
-
if (cv[3].length) {
|
|
201
|
-
getRunnables(cv[3], payload);
|
|
202
|
-
}
|
|
203
|
-
return pt;
|
|
204
|
-
}, payload);
|
|
205
|
-
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
const config = {
|
|
2
2
|
src: "src",
|
|
3
|
-
// outdir: "docs",
|
|
4
3
|
tests: [],
|
|
5
4
|
debugger: true,
|
|
6
5
|
clearScreen: false,
|
|
7
|
-
devMode: true,
|
|
8
6
|
minify: false,
|
|
9
|
-
// outbase: ".",
|
|
10
7
|
ports: ["3001"],
|
|
11
8
|
externals: [],
|
|
12
9
|
nodePlugins: [],
|
|
13
10
|
webPlugins: [],
|
|
11
|
+
importPlugins: [],
|
|
14
12
|
featureIngestor: function (s) {
|
|
15
13
|
throw new Error("Function not implemented.");
|
|
16
14
|
},
|
|
@@ -2,9 +2,7 @@ import baseEsBuildConfig from "./index.js";
|
|
|
2
2
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
3
3
|
import featuresPlugin from "./featuresPlugin";
|
|
4
4
|
export default (config, entryPoints, testName) => {
|
|
5
|
-
const { inputFilesPluginFactory, register } = inputFilesPlugin("node",
|
|
6
|
-
// entryPoints,
|
|
7
|
-
testName);
|
|
5
|
+
const { inputFilesPluginFactory, register } = inputFilesPlugin("node", testName);
|
|
8
6
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
9
7
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
10
8
|
metafile: true, supported: {
|
|
@@ -18,7 +16,10 @@ export default (config, entryPoints, testName) => {
|
|
|
18
16
|
inputFilesPluginFactory,
|
|
19
17
|
{
|
|
20
18
|
name: "rebuild-notify",
|
|
21
|
-
setup(build) {
|
|
19
|
+
setup: (build) => {
|
|
20
|
+
build.onStart(() => {
|
|
21
|
+
console.log(`> node build starting...`);
|
|
22
|
+
});
|
|
22
23
|
build.onEnd((result) => {
|
|
23
24
|
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
24
25
|
if (result.errors.length > 0) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import baseEsBuildConfig from "./index.js";
|
|
2
|
+
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
3
|
+
import featuresPlugin from "./featuresPlugin.js";
|
|
4
|
+
export default (config, entryPoints, testName) => {
|
|
5
|
+
const { inputFilesPluginFactory, register } = inputFilesPlugin("pure", testName);
|
|
6
|
+
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { drop: ["console", "debugger"], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
7
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
8
|
+
metafile: true, supported: {
|
|
9
|
+
"dynamic-import": true,
|
|
10
|
+
}, define: {
|
|
11
|
+
"process.env.FLUENTFFMPEG_COV": "0",
|
|
12
|
+
}, absWorkingDir: process.cwd(), banner: {
|
|
13
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
14
|
+
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
15
|
+
featuresPlugin,
|
|
16
|
+
inputFilesPluginFactory,
|
|
17
|
+
{
|
|
18
|
+
name: "rebuild-notify",
|
|
19
|
+
setup: (build) => {
|
|
20
|
+
build.onStart(() => {
|
|
21
|
+
console.log(`> pure build starting...`);
|
|
22
|
+
});
|
|
23
|
+
build.onEnd((result) => {
|
|
24
|
+
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
25
|
+
if (result.errors.length > 0) {
|
|
26
|
+
console.log(result);
|
|
27
|
+
}
|
|
28
|
+
// console.log(result);
|
|
29
|
+
// result.errors.length !== 0 && process.exit(-1);
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
34
|
+
[]),
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
@@ -29,7 +29,10 @@ export default (config, entryPoints, testName) => {
|
|
|
29
29
|
inputFilesPluginFactory,
|
|
30
30
|
{
|
|
31
31
|
name: "rebuild-notify",
|
|
32
|
-
setup(build) {
|
|
32
|
+
setup: (build) => {
|
|
33
|
+
build.onStart(() => {
|
|
34
|
+
console.log(`> web build starting...`);
|
|
35
|
+
});
|
|
33
36
|
build.onEnd((result) => {
|
|
34
37
|
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
35
38
|
if (result.errors.length > 0) {
|
|
@@ -40,6 +43,6 @@ export default (config, entryPoints, testName) => {
|
|
|
40
43
|
});
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
|
-
...(config.
|
|
46
|
+
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
44
47
|
] });
|
|
45
48
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export class ClassicalComponent extends React.Component {
|
|
3
|
+
constructor(props) {
|
|
4
|
+
super(props);
|
|
5
|
+
this.state = {
|
|
6
|
+
count: 0,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (React.createElement("div", { style: { border: "3px solid black" } },
|
|
11
|
+
React.createElement("h1", { id: "theHeader" }, "Hello Marcus"),
|
|
12
|
+
React.createElement("pre", { id: "theProps" }, JSON.stringify(this.props)),
|
|
13
|
+
React.createElement("p", null,
|
|
14
|
+
"foo: ",
|
|
15
|
+
this.props.foo),
|
|
16
|
+
React.createElement("pre", { id: "theStat" }, JSON.stringify(this.state)),
|
|
17
|
+
React.createElement("p", null,
|
|
18
|
+
"count: ",
|
|
19
|
+
this.state.count,
|
|
20
|
+
" times"),
|
|
21
|
+
React.createElement("button", { id: "theButton", onClick: async () => {
|
|
22
|
+
this.setState({ count: this.state.count + 1 });
|
|
23
|
+
} }, "Click")));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export default ClassicalComponent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const specification = (Suite, Given, When, Then) => {
|
|
2
|
+
return [
|
|
3
|
+
Suite.Default("a classical react component", {
|
|
4
|
+
test0: Given.AnEmptyState([`I click 4 times and the count is 3`], [
|
|
5
|
+
When.IClickTheButton(),
|
|
6
|
+
When.IClickTheButton(),
|
|
7
|
+
When.IClickTheButton(),
|
|
8
|
+
When.IClickTheHeader(),
|
|
9
|
+
// When.IClickTheButton(),
|
|
10
|
+
], [
|
|
11
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
12
|
+
Then.TheStatusIs({ count: 3 }),
|
|
13
|
+
]),
|
|
14
|
+
test1: Given.AnEmptyState([`Count is 1 by default`], [When.IClickTheButton()], [
|
|
15
|
+
Then.ThePropsIs({ foo: "bar", children: [] }),
|
|
16
|
+
Then.TheStatusIs({ count: 1 }),
|
|
17
|
+
]),
|
|
18
|
+
test2: Given.AnEmptyState([`0`], [
|
|
19
|
+
When.IClickTheButton(),
|
|
20
|
+
When.IClickTheButton(),
|
|
21
|
+
When.IClickTheButton(),
|
|
22
|
+
When.IClickTheButton(),
|
|
23
|
+
When.IClickTheButton(),
|
|
24
|
+
When.IClickTheButton(),
|
|
25
|
+
When.IClickTheButton(),
|
|
26
|
+
When.IClickTheButton(),
|
|
27
|
+
When.IClickTheButton(),
|
|
28
|
+
], [Then.TheStatusIs({ count: 9 })]),
|
|
29
|
+
test3: Given.AnEmptyState([`0`], [When.IClickTheButton(), When.IClickTheButton()], [Then.TheStatusIs({ count: 2 })]),
|
|
30
|
+
}, []),
|
|
31
|
+
];
|
|
32
|
+
};
|