testeranto 0.129.0 → 0.134.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 +137197 -0
- package/.aider.input.history +334 -0
- package/.aider.tags.cache.v3/18/8b/7dfca822129dad10b5cacadf7728.val +0 -0
- package/.aider.tags.cache.v3/{ec/c0/161c249c35be853cc40cf11f9267.val → 62/f5/8af72140d93c58db2f6aa5bf3f1f.val} +0 -0
- package/.aider.tags.cache.v3/8d/fa/12860238755bcfab9af8a93c52ab.val +0 -0
- package/.aider.tags.cache.v3/{b7/e6/5be87b62aeaf2bc244ff41c1b61a.val → a7/97/6d37fce350ad2d588f36729db0cd.val} +0 -0
- package/.aider.tags.cache.v3/{e3/e6/3501625caf5d5eb171f0d248462e.val → ad/3c/10f2ab1397f6d544e613d2a6acaf.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- package/.aider.tags.cache.v3/dd/5b/0ade824b0841c7c11e9352c5d2ca.val +0 -0
- package/README.md +333 -34
- package/bundle.js +8 -75
- package/dist/common/src/Init.js +6 -1
- package/dist/common/src/Node.js +6 -4
- package/dist/common/src/NodeSidecar.js +15 -0
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +187 -0
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +109 -0
- package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/base.js +33 -16
- package/dist/common/src/PM/main.js +484 -425
- package/dist/common/src/PM/node.js +44 -19
- package/dist/common/src/PM/nodeSidecar.js +65 -0
- package/dist/common/src/PM/pure.js +55 -47
- package/dist/common/src/PM/pureSidecar.js +48 -0
- package/dist/common/src/PM/sidecar.js +11 -0
- package/dist/common/src/PM/web.js +24 -6
- package/dist/common/src/PM/webSidecar.js +47 -0
- package/dist/common/src/PureSidecar.js +13 -0
- package/dist/common/src/SP__Polygon.test.js +10 -0
- package/dist/common/src/WebSidecar.js +14 -0
- package/dist/common/src/build.js +63 -10
- package/dist/common/src/defaultConfig.js +1 -0
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +27 -0
- package/dist/common/src/esbuildConfigs/pure.js +15 -1
- package/dist/common/src/esbuildConfigs/web.js +10 -1
- package/dist/common/src/{SubPackages/react-dom/jsx/index.js → lib/Sidecar.js} +4 -0
- package/dist/common/src/lib/abstractBase.js +7 -5
- package/dist/common/src/lib/basebuilder.js +1 -3
- package/dist/common/src/lib/classBuilder.js +4 -17
- package/dist/common/src/lib/core.js +11 -6
- package/dist/common/src/lib/index.js +13 -4
- package/dist/common/src/lib/pmProxy.js +1 -1
- package/dist/common/src/mothership/index.js +16 -0
- package/dist/common/src/mothership/test.js +65 -0
- package/dist/common/src/utils/queue.js +36 -0
- package/dist/common/src/utils.js +34 -5
- package/dist/common/testeranto.config.js +77 -39
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +6 -1
- package/dist/module/src/Node.js +6 -4
- package/dist/module/src/NodeSidecar.js +11 -0
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +180 -0
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +104 -0
- package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/base.js +33 -16
- package/dist/module/src/PM/main.js +485 -426
- package/dist/module/src/PM/node.js +44 -19
- package/dist/module/src/PM/nodeSidecar.js +58 -0
- package/dist/module/src/PM/pure.js +55 -44
- package/dist/module/src/PM/pureSidecar.js +41 -0
- package/dist/module/src/PM/sidecar.js +7 -0
- package/dist/module/src/PM/web.js +24 -6
- package/dist/module/src/PM/webSidecar.js +40 -0
- package/dist/module/src/Project.js +154 -75
- package/dist/module/src/PureSidecar.js +9 -0
- package/dist/module/src/ReportClient.js +132 -97
- package/dist/module/src/SP__Polygon.test.js +8 -0
- package/dist/module/src/TestReport.js +32 -14
- package/dist/module/src/WebSidecar.js +10 -0
- package/dist/module/src/build.js +63 -10
- package/dist/module/src/defaultConfig.js +1 -0
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +24 -0
- package/dist/module/src/esbuildConfigs/pure.js +15 -1
- package/dist/module/src/esbuildConfigs/web.js +10 -1
- package/dist/module/src/lib/Sidecar.js +2 -0
- package/dist/module/src/lib/abstractBase.js +7 -5
- package/dist/module/src/lib/basebuilder.js +1 -3
- package/dist/module/src/lib/classBuilder.js +4 -17
- package/dist/module/src/lib/core.js +11 -6
- package/dist/module/src/lib/index.js +12 -4
- package/dist/module/src/lib/pmProxy.js +1 -1
- package/dist/module/src/mothership/index.js +11 -0
- package/dist/module/src/mothership/test.js +60 -0
- package/dist/module/src/utils/queue.js +32 -0
- package/dist/module/src/utils.js +34 -5
- package/dist/module/testeranto.config.js +77 -36
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +3288 -385
- package/dist/prebuild/ReportClient.js +0 -24638
- package/dist/prebuild/TestReport.js +14 -8
- package/dist/prebuild/build.mjs +159 -15
- package/dist/prebuild/init-docs.mjs +2 -5
- package/dist/prebuild/mothership/index.mjs +17 -0
- package/dist/prebuild/run.mjs +693 -412
- package/dist/types/src/NodeSidecar.d.ts +6 -0
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +23 -0
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/base.d.ts +6 -5
- package/dist/types/src/PM/index.d.ts +5 -3
- package/dist/types/src/PM/main.d.ts +23 -26
- package/dist/types/src/PM/node.d.ts +8 -6
- package/dist/types/src/PM/nodeSidecar.d.ts +13 -0
- package/dist/types/src/PM/pure.d.ts +4 -3
- package/dist/types/src/PM/pureSidecar.d.ts +11 -0
- package/dist/types/src/PM/sidecar.d.ts +8 -0
- package/dist/types/src/PM/web.d.ts +18 -8
- package/dist/types/src/PM/webSidecar.d.ts +11 -0
- package/dist/types/src/PureSidecar.d.ts +8 -0
- package/dist/types/src/Types.d.ts +109 -43
- package/dist/types/src/WebSidecar.d.ts +8 -0
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +2 -0
- package/dist/types/src/lib/Sidecar.d.ts +5 -0
- package/dist/types/src/lib/abstractBase.d.ts +6 -6
- package/dist/types/src/lib/classBuilder.d.ts +7 -1
- package/dist/types/src/lib/core.d.ts +7 -1
- package/dist/types/src/lib/index.d.ts +10 -4
- package/dist/types/src/lib/types.d.ts +12 -2
- package/dist/types/src/mothership/index.d.ts +2 -0
- package/dist/types/src/mothership/test.d.ts +21 -0
- package/dist/types/src/utils/queue.d.ts +11 -0
- package/dist/types/src/utils.d.ts +4 -7
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +19 -105
- package/src/Init.ts +6 -5
- package/src/Node.ts +7 -4
- package/src/NodeSidecar.ts +22 -0
- package/src/PM/PM_WithEslintAndTsc.ts +284 -0
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +173 -0
- package/src/PM/__tests__/pureSidecar.testeranto.ts +157 -0
- package/src/PM/__tests__/webSidecar.testeranto.ts +157 -0
- package/src/PM/base.ts +38 -17
- package/src/PM/index.ts +9 -3
- package/src/PM/main.ts +608 -582
- package/src/PM/node.ts +67 -23
- package/src/PM/nodeSidecar.ts +73 -0
- package/src/PM/pure.ts +68 -58
- package/src/PM/pureSidecar.ts +56 -0
- package/src/PM/sidecar.ts +48 -0
- package/src/PM/web.ts +42 -11
- package/src/PM/webSidecar.ts +55 -0
- package/src/Project.tsx +312 -109
- package/src/Pure.ts +0 -2
- package/src/PureSidecar.ts +14 -0
- package/src/ReportClient.tsx +164 -170
- package/src/SP__Polygon.test.ts +13 -0
- package/src/TestReport.tsx +77 -6
- package/src/Types.ts +227 -122
- package/src/WebSidecar.ts +14 -0
- package/src/build.ts +101 -14
- package/src/defaultConfig.ts +1 -0
- package/src/esbuildConfigs/README.md +46 -0
- package/src/esbuildConfigs/consoleDetectorPlugin.ts +29 -0
- package/src/esbuildConfigs/pure.ts +22 -1
- package/src/esbuildConfigs/web.ts +13 -0
- package/src/lib/Sidecar.ts +6 -0
- package/src/lib/TEST_ADAPTER_RENAME.md +48 -0
- package/src/lib/abstractBase.ts +12 -9
- package/src/lib/basebuilder.ts +5 -4
- package/src/lib/classBuilder.ts +15 -18
- package/src/lib/core.ts +24 -11
- package/src/lib/index.ts +38 -18
- package/src/lib/pmProxy.ts +3 -1
- package/src/lib/types.ts +15 -2
- package/src/mothership/index.ts +15 -0
- package/src/mothership/test.ts +137 -0
- package/src/run.ts +0 -1
- package/src/utils/queue.ts +41 -0
- package/src/utils.ts +41 -15
- package/testeranto/bundles/node/mothership/chunk-PG6KUKNP.mjs +44 -0
- package/testeranto/bundles/node/mothership/chunk-V2EQEXU2.mjs +1032 -0
- package/testeranto/bundles/node/mothership/metafile.json +389 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +1219 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/pureSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +1199 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/webSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/mothership/test.mjs +24411 -0
- package/testeranto/bundles/pure/mothership/metafile.json +8 -0
- package/testeranto/bundles/web/mothership/metafile.json +8 -0
- package/testeranto/index.html +4 -4
- package/testeranto/reports/mothership/config.json +25 -0
- package/testeranto/reports/{redux → mothership}/index.html +8 -8
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +35 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +56 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +29 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +4 -0
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +20 -0
- package/testeranto/reports/mothership/src/mothership/test/node/lint_errors.json +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +24 -0
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +18 -0
- package/testeranto/reports/mothership/summary.json +9 -0
- package/testeranto.config.ts +82 -44
- package/tsc.log +78 -81
- package/dist/common/src/SubPackages/react/component/index.js +0 -20
- package/dist/common/src/SubPackages/react/component/node.js +0 -10
- package/dist/common/src/SubPackages/react/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react/component/web.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/index.js +0 -64
- package/dist/common/src/SubPackages/react/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/dynamic.js +0 -61
- package/dist/common/src/SubPackages/react-dom/component/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/static.js +0 -26
- package/dist/common/src/SubPackages/react-dom/component/web.js +0 -16
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +0 -31
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +0 -59
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +0 -16
- package/dist/common/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +0 -15
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +0 -70
- package/dist/common/src/SubPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -57
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/web.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/fc/node.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/fc/web.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/jsx/index.js +0 -67
- package/dist/common/src/SubPackages/react-test-renderer/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
- package/dist/common/src/examples/react/component/index.js +0 -33
- package/dist/common/src/examples/react/component/test.js +0 -36
- package/dist/module/src/SubPackages/react/component/index.js +0 -13
- package/dist/module/src/SubPackages/react/component/node.js +0 -5
- package/dist/module/src/SubPackages/react/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react/component/web.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/index.js +0 -58
- package/dist/module/src/SubPackages/react/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/dynamic.js +0 -54
- package/dist/module/src/SubPackages/react-dom/component/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/static.js +0 -22
- package/dist/module/src/SubPackages/react-dom/component/web.js +0 -11
- package/dist/module/src/SubPackages/react-dom/jsx/dynamic.js +0 -27
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +0 -53
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +0 -11
- package/dist/module/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +0 -14
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +0 -31
- package/dist/module/src/SubPackages/react-test-renderer/component/node.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -54
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/web.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/fc/node.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/fc/web.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +0 -28
- package/dist/module/src/SubPackages/react-test-renderer/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
- package/dist/module/src/examples/react/component/index.js +0 -26
- package/dist/module/src/examples/react/component/test.js +0 -32
- package/dist/prebuild/ReportClient.css +0 -11342
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/src/SubPackages/react/component/index.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +0 -20
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +0 -9
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -6
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -11
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/src/examples/react/component/index.d.ts +0 -13
- package/dist/types/src/examples/react/component/test.d.ts +0 -17
- package/src/SubPackages/react/component/index.ts +0 -28
- package/src/SubPackages/react/component/node.ts +0 -17
- package/src/SubPackages/react/component/pure.ts +0 -17
- package/src/SubPackages/react/component/web.ts +0 -17
- package/src/SubPackages/react/jsx/index.ts +0 -75
- package/src/SubPackages/react/jsx/node.ts +0 -23
- package/src/SubPackages/react/jsx/pure.ts +0 -23
- package/src/SubPackages/react/jsx/web.ts +0 -24
- package/src/SubPackages/react-dom/component/dynamic.ts +0 -107
- package/src/SubPackages/react-dom/component/node.ts +0 -17
- package/src/SubPackages/react-dom/component/pure.ts +0 -17
- package/src/SubPackages/react-dom/component/static.ts +0 -41
- package/src/SubPackages/react-dom/component/web.ts +0 -32
- package/src/SubPackages/react-dom/jsx/dynamic.ts +0 -46
- package/src/SubPackages/react-dom/jsx/index.ts +0 -6
- package/src/SubPackages/react-dom/jsx/node.ts +0 -18
- package/src/SubPackages/react-dom/jsx/pure.ts +0 -18
- package/src/SubPackages/react-dom/jsx/static.ts +0 -87
- package/src/SubPackages/react-dom/jsx/web.ts +0 -26
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +0 -54
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -32
- package/src/SubPackages/react-test-renderer/component/interface.ts +0 -43
- package/src/SubPackages/react-test-renderer/component/node.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/pure.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +0 -63
- package/src/SubPackages/react-test-renderer/component/test/node.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/web.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/web.ts +0 -18
- package/src/SubPackages/react-test-renderer/fc/node.ts +0 -83
- package/src/SubPackages/react-test-renderer/fc/web.ts +0 -80
- package/src/SubPackages/react-test-renderer/jsx/index.ts +0 -61
- package/src/SubPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/web.ts +0 -32
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +0 -73
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +0 -36
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +0 -36
- package/src/examples/react/component/index.tsx +0 -35
- package/src/examples/react/component/test.ts +0 -83
- package/testeranto/bundles/node/redux/metafile.json +0 -559
- package/testeranto/bundles/pure/redux/metafile.json +0 -554
- package/testeranto/bundles/web/redux/metafile.json +0 -504
- package/testeranto/bundles/web/redux/test/web.html +0 -19
- package/testeranto/reports/redux/config.json +0 -38
- package/testeranto/reports/redux/summary.json +0 -20
- /package/dist/{module/src/SubPackages/react-dom/jsx/index.js → types/src/SP__Polygon.test.d.ts} +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const testInterface = {
|
|
3
|
-
andWhen: async (s, whenCB) => {
|
|
4
|
-
await whenCB(s());
|
|
5
|
-
return new Promise((resolve, rej) => {
|
|
6
|
-
resolve(React.createElement(s));
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
butThen: async (subject, thenCB) => {
|
|
10
|
-
await thenCB(subject());
|
|
11
|
-
return new Promise((resolve, rej) => {
|
|
12
|
-
resolve(React.createElement(subject));
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
// export type IWhenShape = any;
|
|
17
|
-
// export type IThenShape = any;
|
|
18
|
-
// export type InitialState = unknown;
|
|
19
|
-
// export type IInput = () => JSX.Element;
|
|
20
|
-
// export type ISelection = CElement<any, any>;
|
|
21
|
-
// export type IStore = CElement<any, any>;
|
|
22
|
-
// export type ISubject = CElement<any, any>;
|
|
23
|
-
// export type ITestImpl<
|
|
24
|
-
// I extends Ibdd_in<
|
|
25
|
-
// unknown,
|
|
26
|
-
// unknown,
|
|
27
|
-
// unknown,
|
|
28
|
-
// unknown,
|
|
29
|
-
// unknown,
|
|
30
|
-
// unknown,
|
|
31
|
-
// unknown
|
|
32
|
-
// >,
|
|
33
|
-
// O extends Ibdd_out<
|
|
34
|
-
// Record<string, any>,
|
|
35
|
-
// Record<string, any>,
|
|
36
|
-
// Record<string, any>,
|
|
37
|
-
// Record<string, any>,
|
|
38
|
-
// Record<string, any>
|
|
39
|
-
// >
|
|
40
|
-
// > = ITestImplementation<I, O>;
|
|
41
|
-
// export type ITestSpec<
|
|
42
|
-
// I extends Ibdd_in<
|
|
43
|
-
// unknown,
|
|
44
|
-
// unknown,
|
|
45
|
-
// unknown,
|
|
46
|
-
// unknown,
|
|
47
|
-
// unknown,
|
|
48
|
-
// unknown,
|
|
49
|
-
// unknown
|
|
50
|
-
// >,
|
|
51
|
-
// O extends Ibdd_out<
|
|
52
|
-
// Record<string, any>,
|
|
53
|
-
// Record<string, any>,
|
|
54
|
-
// Record<string, any>,
|
|
55
|
-
// Record<string, any>,
|
|
56
|
-
// Record<string, any>
|
|
57
|
-
// >
|
|
58
|
-
// > = ITestSpecification<I, O>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Testeranto from "../../../Node.js";
|
|
2
|
-
import { testInterface as baseInterface } from "./index.js";
|
|
3
|
-
export default (testImplementations, testSpecifications, testInput, testInterface = baseInterface) => {
|
|
4
|
-
return Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
5
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Testeranto from "../../../Pure.js";
|
|
2
|
-
import { testInterface as baseInterface } from "./index.js";
|
|
3
|
-
export default (testImplementations, testSpecifications, testInput, testInterface = baseInterface) => {
|
|
4
|
-
return Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
5
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Testeranto from "../../../Web.js";
|
|
2
|
-
import { testInterface as baseInterface } from "./index.js";
|
|
3
|
-
export default (testImplementations, testSpecifications, testInput, testInterface = baseInterface) => {
|
|
4
|
-
return Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
5
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactDom from "react-dom/client";
|
|
3
|
-
export const testInterfacer = () => {
|
|
4
|
-
class TesterantoComponent extends React.Component {
|
|
5
|
-
constructor(props) {
|
|
6
|
-
super(props);
|
|
7
|
-
this.done = props.done;
|
|
8
|
-
}
|
|
9
|
-
componentDidMount() {
|
|
10
|
-
super.componentDidMount && super.componentDidMount();
|
|
11
|
-
return this.done(this);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
beforeAll: async (subject, artificer) => {
|
|
16
|
-
return await new Promise((resolve, rej) => {
|
|
17
|
-
const htmlElement = document.getElementById("root");
|
|
18
|
-
if (htmlElement) {
|
|
19
|
-
const domRoot = ReactDom.createRoot(htmlElement);
|
|
20
|
-
resolve({ domRoot, htmlElement });
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
beforeEach: async ({ domRoot, htmlElement }, initialValues, testResource, artificer) => {
|
|
25
|
-
return new Promise(async (resolve, rej) => {
|
|
26
|
-
domRoot.render(createElement(TesterantoComponent, Object.assign(Object.assign({}, initialValues), { done: (reactElement) => {
|
|
27
|
-
resolve({
|
|
28
|
-
htmlElement,
|
|
29
|
-
reactElement,
|
|
30
|
-
domRoot,
|
|
31
|
-
});
|
|
32
|
-
} }), []));
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
andWhen: async function (s, whenCB) {
|
|
36
|
-
return whenCB(s);
|
|
37
|
-
},
|
|
38
|
-
butThen: async function (s, thenCB) {
|
|
39
|
-
return thenCB(s);
|
|
40
|
-
},
|
|
41
|
-
afterEach: (testInterface === null || testInterface === void 0 ? void 0 : testInterface.afterEach) ||
|
|
42
|
-
async function (store, ndx, utils) {
|
|
43
|
-
return store;
|
|
44
|
-
},
|
|
45
|
-
afterAll: async (store, utils) => {
|
|
46
|
-
// setTimeout(() => {
|
|
47
|
-
// console.log("This will run after 1 second");
|
|
48
|
-
// }, 1000); // 1000 milliseconds = 1 second
|
|
49
|
-
// store.htmlElement.remove();
|
|
50
|
-
// store.htmlElement = document.createElement("root");
|
|
51
|
-
return store;
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
export const testInterfacer = (testInput) => {
|
|
3
|
-
return {
|
|
4
|
-
beforeEach: async () => {
|
|
5
|
-
return new Promise((resolve, rej) => {
|
|
6
|
-
resolve(createElement(testInput));
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
andWhen: async function (s, whenCB) {
|
|
10
|
-
return whenCB(s);
|
|
11
|
-
},
|
|
12
|
-
butThen: async function (s) {
|
|
13
|
-
return s;
|
|
14
|
-
},
|
|
15
|
-
afterEach: async function () {
|
|
16
|
-
return {};
|
|
17
|
-
},
|
|
18
|
-
afterAll: () => {
|
|
19
|
-
return;
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Testeranto from "../../../Web.js";
|
|
2
|
-
export default (testInput, testSpecifications, testImplementations, testInterface) => {
|
|
3
|
-
const t = Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
4
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
5
|
-
const elem = document.getElementById("root");
|
|
6
|
-
if (elem) {
|
|
7
|
-
return t;
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
export const testInterfacer = (testInput) => {
|
|
3
|
-
return {
|
|
4
|
-
beforeAll: async (prototype, artificer) => {
|
|
5
|
-
return await new Promise((resolve, rej) => {
|
|
6
|
-
resolve(null);
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
beforeEach: async () => {
|
|
10
|
-
return new Promise((resolve, rej) => {
|
|
11
|
-
resolve(createElement(testInput));
|
|
12
|
-
});
|
|
13
|
-
},
|
|
14
|
-
andWhen: async function (s, whenCB) {
|
|
15
|
-
return s;
|
|
16
|
-
},
|
|
17
|
-
butThen: async function (s) {
|
|
18
|
-
return s;
|
|
19
|
-
},
|
|
20
|
-
afterEach: async function (store, ndx, artificer) {
|
|
21
|
-
return {};
|
|
22
|
-
},
|
|
23
|
-
afterAll: (store, artificer) => {
|
|
24
|
-
return;
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
import test from "../../../Node";
|
|
4
|
-
export default (testImplementations, testSpecifications, testInput) => test(testInput, testSpecifications, testImplementations, {
|
|
5
|
-
beforeEach: function (CComponent, props) {
|
|
6
|
-
let component;
|
|
7
|
-
act(() => {
|
|
8
|
-
component = renderer.create(React.createElement(CComponent, props, []));
|
|
9
|
-
});
|
|
10
|
-
return component;
|
|
11
|
-
},
|
|
12
|
-
andWhen: async function (renderer, whenCB) {
|
|
13
|
-
await act(() => whenCB()(renderer));
|
|
14
|
-
return renderer;
|
|
15
|
-
},
|
|
16
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
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>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
export const testInterface = {
|
|
4
|
-
beforeEach: function (CComponent, propsAndChildren) {
|
|
5
|
-
function Link(proper) {
|
|
6
|
-
return React.createElement(CComponent, proper(), []);
|
|
7
|
-
}
|
|
8
|
-
return new Promise((res, rej) => {
|
|
9
|
-
act(async () => {
|
|
10
|
-
const testRenderer = await renderer.create(Link(propsAndChildren));
|
|
11
|
-
res(testRenderer);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
andWhen: async function (renderer, whenCB) {
|
|
16
|
-
await act(() => whenCB(renderer));
|
|
17
|
-
return renderer;
|
|
18
|
-
},
|
|
19
|
-
// andWhen: function (s: Store, whenCB): Promise<Selection> {
|
|
20
|
-
// return whenCB()(s);
|
|
21
|
-
// },
|
|
22
|
-
butThen: async function (s, thenCB, tr) {
|
|
23
|
-
return thenCB(s);
|
|
24
|
-
},
|
|
25
|
-
afterEach: async function (store, ndx, artificer) {
|
|
26
|
-
return {};
|
|
27
|
-
},
|
|
28
|
-
afterAll: (store, artificer) => {
|
|
29
|
-
return;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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);
|
|
@@ -1,5 +0,0 @@
|
|
|
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);
|
|
@@ -1,5 +0,0 @@
|
|
|
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);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
import test from "../../../Node.js";
|
|
4
|
-
export default (testImplementations, testSpecifications, testInput) => test(testInput, testSpecifications, testImplementations, {
|
|
5
|
-
beforeEach: function (CComponent, props) {
|
|
6
|
-
return new Promise((res, rej) => {
|
|
7
|
-
let component;
|
|
8
|
-
act(() => {
|
|
9
|
-
component = renderer.create(React.createElement(CComponent, props, []));
|
|
10
|
-
res(component);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
},
|
|
14
|
-
andWhen: async function (renderer, whenCB) {
|
|
15
|
-
await act(() => whenCB()(renderer));
|
|
16
|
-
return renderer;
|
|
17
|
-
},
|
|
18
|
-
afterEach: async (store, key, artificer) => {
|
|
19
|
-
console.log("afterall");
|
|
20
|
-
store.unmount();
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
import test from "../../../Web.js";
|
|
4
|
-
export default (testImplementations, testSpecifications, testInput) => test(testInput, testSpecifications, testImplementations, {
|
|
5
|
-
beforeEach: function (CComponent, props) {
|
|
6
|
-
return new Promise((res, rej) => {
|
|
7
|
-
let component;
|
|
8
|
-
act(() => {
|
|
9
|
-
component = renderer.create(React.createElement(CComponent, props, []));
|
|
10
|
-
res(component);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
},
|
|
14
|
-
andWhen: async function (renderer, whenCB) {
|
|
15
|
-
await act(() => whenCB()(renderer));
|
|
16
|
-
return renderer;
|
|
17
|
-
},
|
|
18
|
-
afterEach: async (store, key, artificer) => {
|
|
19
|
-
console.log("afterall");
|
|
20
|
-
store.unmount();
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
export const testInterface = {
|
|
4
|
-
butThen: async function (s, thenCB) {
|
|
5
|
-
// console.log("butThen", thenCB.toString());
|
|
6
|
-
return thenCB(s);
|
|
7
|
-
},
|
|
8
|
-
beforeEach: function (CComponent, props) {
|
|
9
|
-
let component;
|
|
10
|
-
act(() => {
|
|
11
|
-
// component = renderer.create(
|
|
12
|
-
// React.createElement(
|
|
13
|
-
// AppContext.Provider,
|
|
14
|
-
// { value: contextValue },
|
|
15
|
-
// React.createElement(AppContext.Consumer, null, (context) =>
|
|
16
|
-
// React.createElement(CComponent, Object.assign({}, context, {}))
|
|
17
|
-
// )
|
|
18
|
-
// )
|
|
19
|
-
// );
|
|
20
|
-
component = renderer.create(React.createElement(CComponent, props, React.createElement(CComponent, props, [])));
|
|
21
|
-
});
|
|
22
|
-
return component;
|
|
23
|
-
},
|
|
24
|
-
andWhen: async function (renderer, whenCB) {
|
|
25
|
-
await act(() => whenCB(renderer));
|
|
26
|
-
return renderer;
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import test from "../../../Node.js";
|
|
2
|
-
import { testInterface } from "./index.js";
|
|
3
|
-
export default (testImplementations, testSpecifications, testInput, testInterface2 = testInterface) => {
|
|
4
|
-
return test(testInput, testSpecifications, testImplementations, testInterface2);
|
|
5
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import test from "../../../Web.js";
|
|
2
|
-
import { testInterface } from "./index.js";
|
|
3
|
-
export default (testImplementations, testSpecifications, testInput, testInterface2 = testInterface) => {
|
|
4
|
-
return test(testInput, testSpecifications, testImplementations, testInterface2);
|
|
5
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import renderer, { act } from "react-test-renderer";
|
|
2
|
-
export const testInterface = {
|
|
3
|
-
beforeEach: async (CComponent) => {
|
|
4
|
-
return new Promise((res, rej) => {
|
|
5
|
-
let component;
|
|
6
|
-
act(async () => {
|
|
7
|
-
component = renderer.create(CComponent);
|
|
8
|
-
});
|
|
9
|
-
res(component);
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
andWhen: async function (renderer, whenCB) {
|
|
13
|
-
await act(() => whenCB()(renderer));
|
|
14
|
-
return renderer;
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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;
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
};
|