testeranto 0.129.0 → 0.135.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 +137798 -0
- package/.aider.input.history +370 -0
- package/.aider.tags.cache.v3/{ec/c0/161c249c35be853cc40cf11f9267.val → 62/f5/8af72140d93c58db2f6aa5bf3f1f.val} +0 -0
- package/.aider.tags.cache.v3/8e/ec/2d4659a1589a0187a757ab1cbefa.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/d8/b0/a8966fcd65890fd9f70d7afe8141.val +0 -0
- package/.aider.tags.cache.v3/dd/5b/0ade824b0841c7c11e9352c5d2ca.val +0 -0
- package/README.md +194 -182
- 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 +189 -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 +492 -428
- package/dist/common/src/PM/node.js +54 -22
- 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 +66 -12
- package/dist/common/src/defaultConfig.js +1 -0
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +27 -0
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +12 -12
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +12 -17
- package/dist/common/src/lib/Sidecar.js +6 -0
- package/dist/common/src/lib/abstractBase.js +13 -6
- package/dist/common/src/lib/basebuilder.js +1 -3
- package/dist/common/src/lib/classBuilder.js +6 -20
- 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 +182 -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 +493 -429
- package/dist/module/src/PM/node.js +54 -22
- 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 +66 -12
- package/dist/module/src/defaultConfig.js +1 -0
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +24 -0
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +12 -12
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +12 -17
- package/dist/module/src/lib/Sidecar.js +2 -0
- package/dist/module/src/lib/abstractBase.js +13 -6
- package/dist/module/src/lib/basebuilder.js +1 -3
- package/dist/module/src/lib/classBuilder.js +6 -20
- 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 +3287 -385
- package/dist/prebuild/ReportClient.js +0 -24638
- package/dist/prebuild/TestReport.js +26 -22
- package/dist/prebuild/build.mjs +192 -70
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +2 -5
- package/dist/prebuild/mothership/index.mjs +17 -0
- package/dist/prebuild/run.mjs +733 -433
- package/dist/types/src/CoreTypes.d.ts +51 -0
- package/dist/types/src/Node.d.ts +2 -2
- 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 +2 -0
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -0
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -0
- package/dist/types/src/PM/base.d.ts +6 -5
- package/dist/types/src/PM/index.d.ts +6 -4
- 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/SP__Polygon.test.d.ts +1 -0
- package/dist/types/src/Types.d.ts +80 -58
- package/dist/types/src/Web.d.ts +1 -1
- package/dist/types/src/WebSidecar.d.ts +8 -0
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +2 -0
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/Sidecar.d.ts +5 -0
- package/dist/types/src/lib/abstractBase.d.ts +6 -12
- package/dist/types/src/lib/classBuilder.d.ts +7 -1
- package/dist/types/src/lib/core.d.ts +8 -2
- 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 +2 -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/docs/index.md +277 -0
- package/package.json +23 -104
- package/src/CoreTypes.ts +171 -0
- package/src/Init.ts +6 -5
- package/src/Node.ts +32 -15
- package/src/NodeSidecar.ts +22 -0
- package/src/PM/PM_WithEslintAndTsc.ts +315 -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 +10 -4
- package/src/PM/main.ts +616 -589
- package/src/PM/node.ts +77 -33
- 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 +278 -157
- package/src/Web.ts +0 -3
- package/src/WebSidecar.ts +14 -0
- package/src/build.ts +104 -16
- package/src/defaultConfig.ts +1 -0
- package/src/esbuildConfigs/README.md +46 -0
- package/src/esbuildConfigs/consoleDetectorPlugin.ts +29 -0
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +19 -14
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +15 -18
- package/src/lib/Sidecar.ts +6 -0
- package/src/lib/TEST_ADAPTER_RENAME.md +48 -0
- package/src/lib/abstractBase.ts +18 -10
- package/src/lib/basebuilder.ts +5 -4
- package/src/lib/classBuilder.ts +19 -21
- package/src/lib/core.ts +28 -19
- 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/common/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
- /package/dist/module/src/{SubPackages/react-dom/jsx/index.js → CoreTypes.js} +0 -0
package/src/lib/classBuilder.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
3
|
import { IT, ITestImplementation, ITestSpecification, OT } from "../Types.js";
|
|
2
4
|
|
|
3
5
|
import { BaseBuilder } from "./basebuilder.js";
|
|
@@ -27,7 +29,13 @@ export abstract class ClassBuilder<
|
|
|
27
29
|
IExtenstions
|
|
28
30
|
> {
|
|
29
31
|
constructor(
|
|
30
|
-
testImplementation: ITestImplementation<I, O, M
|
|
32
|
+
testImplementation: ITestImplementation<I, O, M> & {
|
|
33
|
+
suites: Record<string, any>;
|
|
34
|
+
givens: Record<string, any>;
|
|
35
|
+
whens: Record<string, any>;
|
|
36
|
+
thens: Record<string, any>;
|
|
37
|
+
checks: Record<string, any>;
|
|
38
|
+
},
|
|
31
39
|
testSpecification: ITestSpecification<I, O>,
|
|
32
40
|
input: I["iinput"],
|
|
33
41
|
suiteKlasser: ISuiteKlasser<I, O>,
|
|
@@ -54,15 +62,14 @@ export abstract class ClassBuilder<
|
|
|
54
62
|
|
|
55
63
|
const classyGivens = Object.entries(testImplementation.givens).reduce(
|
|
56
64
|
(a, [key, g]) => {
|
|
57
|
-
a[key] = (features, whens, thens) => {
|
|
58
|
-
// console.log("givEn", givEn.toString());
|
|
65
|
+
a[key] = (features, whens, thens, ...initialValues) => {
|
|
59
66
|
return new givenKlasser.prototype.constructor(
|
|
60
67
|
key,
|
|
61
68
|
features,
|
|
62
69
|
whens,
|
|
63
70
|
thens,
|
|
64
|
-
testImplementation.givens[key]
|
|
65
|
-
|
|
71
|
+
testImplementation.givens[key],
|
|
72
|
+
initialValues
|
|
66
73
|
);
|
|
67
74
|
};
|
|
68
75
|
return a;
|
|
@@ -72,10 +79,10 @@ export abstract class ClassBuilder<
|
|
|
72
79
|
|
|
73
80
|
const classyWhens = Object.entries(testImplementation.whens).reduce(
|
|
74
81
|
(a, [key, whEn]: [string, (x) => any]) => {
|
|
75
|
-
a[key] = (payload
|
|
82
|
+
a[key] = (...payload: any) => {
|
|
76
83
|
return new whenKlasser.prototype.constructor(
|
|
77
84
|
`${whEn.name}: ${payload && payload.toString()}`,
|
|
78
|
-
whEn(payload)
|
|
85
|
+
whEn(...payload)
|
|
79
86
|
);
|
|
80
87
|
};
|
|
81
88
|
return a;
|
|
@@ -83,23 +90,14 @@ export abstract class ClassBuilder<
|
|
|
83
90
|
{}
|
|
84
91
|
);
|
|
85
92
|
|
|
86
|
-
const classyThens = Object.entries(
|
|
93
|
+
const classyThens = Object.entries<(expected: any, ...x: any[]) => any>(
|
|
94
|
+
testImplementation.thens
|
|
95
|
+
).reduce(
|
|
87
96
|
(a, [key, thEn]: [string, (s: I["iselection"]) => I["isubject"]]) => {
|
|
88
|
-
a[key] = (expected, x) => {
|
|
97
|
+
a[key] = (expected, ...x) => {
|
|
89
98
|
return new thenKlasser.prototype.constructor(
|
|
90
99
|
`${thEn.name}: ${expected && expected.toString()}`,
|
|
91
|
-
|
|
92
|
-
// thEn(expected);
|
|
93
|
-
// // return new Promise((res), rej) => {
|
|
94
|
-
|
|
95
|
-
// // }
|
|
96
|
-
// // try {
|
|
97
|
-
// // thEn(expected);
|
|
98
|
-
// // } catch (c) {
|
|
99
|
-
// // console.log("mark99");
|
|
100
|
-
// // }
|
|
101
|
-
// },
|
|
102
|
-
thEn(expected)
|
|
100
|
+
thEn(expected, ...x)
|
|
103
101
|
);
|
|
104
102
|
};
|
|
105
103
|
return a;
|
package/src/lib/core.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ITestSpecification,
|
|
3
|
-
ITestImplementation,
|
|
4
|
-
ITestInterface,
|
|
5
|
-
IT,
|
|
6
|
-
OT,
|
|
7
|
-
} from "../Types.js";
|
|
8
|
-
|
|
9
1
|
import {
|
|
10
2
|
DefaultTestInterface,
|
|
11
3
|
IFinalResults,
|
|
@@ -23,6 +15,11 @@ import {
|
|
|
23
15
|
} from "./abstractBase.js";
|
|
24
16
|
import { ClassBuilder } from "./classBuilder.js";
|
|
25
17
|
import { IPM } from "./types";
|
|
18
|
+
import {
|
|
19
|
+
ITestSpecification,
|
|
20
|
+
ITestImplementation,
|
|
21
|
+
ITestInterface,
|
|
22
|
+
} from "../CoreTypes.js";
|
|
26
23
|
|
|
27
24
|
export default abstract class Testeranto<
|
|
28
25
|
I extends IT,
|
|
@@ -32,7 +29,13 @@ export default abstract class Testeranto<
|
|
|
32
29
|
constructor(
|
|
33
30
|
input: I["iinput"],
|
|
34
31
|
testSpecification: ITestSpecification<I, O>,
|
|
35
|
-
testImplementation: ITestImplementation<I, O, M
|
|
32
|
+
testImplementation: ITestImplementation<I, O, M> & {
|
|
33
|
+
suites: Record<string, any>;
|
|
34
|
+
givens: Record<string, any>;
|
|
35
|
+
whens: Record<string, any>;
|
|
36
|
+
thens: Record<string, any>;
|
|
37
|
+
checks: Record<string, any>;
|
|
38
|
+
},
|
|
36
39
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
|
|
37
40
|
testInterface: Partial<ITestInterface<I>>,
|
|
38
41
|
uberCatcher: (cb: () => void) => void
|
|
@@ -111,16 +114,22 @@ export default abstract class Testeranto<
|
|
|
111
114
|
|
|
112
115
|
class When extends BaseWhen<I> {
|
|
113
116
|
async andWhen(store, whenCB, testResource, pm) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
return await fullTestInterface.andWhen(
|
|
118
|
+
store,
|
|
119
|
+
whenCB,
|
|
120
|
+
testResource,
|
|
121
|
+
pm
|
|
122
|
+
);
|
|
123
|
+
// try {
|
|
124
|
+
// return await fullTestInterface.andWhen(
|
|
125
|
+
// store,
|
|
126
|
+
// whenCB,
|
|
127
|
+
// testResource,
|
|
128
|
+
// pm
|
|
129
|
+
// );
|
|
130
|
+
// } catch (e) {
|
|
131
|
+
// console.log("mark22", e);
|
|
132
|
+
// }
|
|
124
133
|
}
|
|
125
134
|
} as any,
|
|
126
135
|
|
package/src/lib/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
3
|
import { PM_Pure } from "../PM/pure.js";
|
|
2
4
|
|
|
3
5
|
import { PM_Node } from "../PM/node.js";
|
|
@@ -16,32 +18,44 @@ import {
|
|
|
16
18
|
import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
|
|
17
19
|
import { IPM } from "./types.js";
|
|
18
20
|
|
|
19
|
-
export const BaseTestInterface: ITestInterface<
|
|
20
|
-
beforeAll: async (s) => s,
|
|
21
|
+
export const BaseTestInterface = <T extends IT>(): ITestInterface<T> => ({
|
|
22
|
+
beforeAll: async (s: T["istore"]) => s,
|
|
21
23
|
beforeEach: async function (
|
|
22
|
-
subject:
|
|
23
|
-
initialValues:
|
|
24
|
-
x:
|
|
25
|
-
testResource:
|
|
24
|
+
subject: T["isubject"],
|
|
25
|
+
initialValues: T["iinitialValues"],
|
|
26
|
+
x: unknown,
|
|
27
|
+
testResource: ITTestResourceConfiguration,
|
|
26
28
|
pm: IPM
|
|
27
|
-
) {
|
|
28
|
-
return subject
|
|
29
|
+
): Promise<T["isubject"]> {
|
|
30
|
+
return subject;
|
|
29
31
|
},
|
|
30
|
-
afterEach: async (s) => s,
|
|
31
|
-
afterAll: (store:
|
|
32
|
+
afterEach: async (s: T["istore"]) => s,
|
|
33
|
+
afterAll: (store: T["istore"]) => undefined,
|
|
32
34
|
butThen: async (
|
|
33
35
|
store: IT["istore"],
|
|
34
36
|
thenCb: (s: IT["iselection"]) => Promise<IT["isubject"]>
|
|
35
37
|
) => {
|
|
36
38
|
return thenCb(store);
|
|
37
39
|
},
|
|
38
|
-
andWhen: async (
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
andWhen: async (
|
|
41
|
+
store: IT["istore"],
|
|
42
|
+
whenCB: IT["when"],
|
|
43
|
+
testResource: ITTestResourceConfiguration,
|
|
44
|
+
pm: IPM
|
|
45
|
+
) => {
|
|
46
|
+
try {
|
|
47
|
+
await whenCB(store, testResource, pm);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error("Error in andWhen:", error);
|
|
50
|
+
throw error; // Re-throw to maintain test failure
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
assertThis: (x: any) => x,
|
|
54
|
+
});
|
|
41
55
|
|
|
42
|
-
export const DefaultTestInterface = (
|
|
43
|
-
p: Partial<ITestInterface<
|
|
44
|
-
): ITestInterface<
|
|
56
|
+
export const DefaultTestInterface = <T extends IT>(
|
|
57
|
+
p: Partial<ITestInterface<T>>
|
|
58
|
+
): ITestInterface<T> => {
|
|
45
59
|
return {
|
|
46
60
|
...BaseTestInterface,
|
|
47
61
|
...p,
|
|
@@ -52,7 +66,10 @@ export type ITTestResourceConfiguration = {
|
|
|
52
66
|
name: string;
|
|
53
67
|
fs: string;
|
|
54
68
|
ports: number[];
|
|
55
|
-
browserWSEndpoint
|
|
69
|
+
browserWSEndpoint?: string;
|
|
70
|
+
timeout?: number;
|
|
71
|
+
retries?: number;
|
|
72
|
+
environment?: Record<string, string>;
|
|
56
73
|
};
|
|
57
74
|
|
|
58
75
|
export type ITTestResourceRequirement = {
|
|
@@ -112,8 +129,11 @@ export type { ITestconfig, IBuiltConfig, IRunTime, ITestTypes };
|
|
|
112
129
|
|
|
113
130
|
export type IRunnables = {
|
|
114
131
|
nodeEntryPoints: Record<string, string>;
|
|
132
|
+
nodeEntryPointSidecars: Record<string, string>;
|
|
115
133
|
webEntryPoints: Record<string, string>;
|
|
116
|
-
|
|
134
|
+
webEntryPointSidecars: Record<string, string>;
|
|
135
|
+
pureEntryPoints: Record<string, string>;
|
|
136
|
+
pureEntryPointSidecars: Record<string, string>;
|
|
117
137
|
};
|
|
118
138
|
|
|
119
139
|
export type IFinalResults = {
|
package/src/lib/pmProxy.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
3
|
import { IPM } from "./types";
|
|
2
4
|
|
|
3
5
|
const prxy = function (pm: IPM, mappings: [string, (...x) => any][]) {
|
|
@@ -8,7 +10,7 @@ const prxy = function (pm: IPM, mappings: [string, (...x) => any][]) {
|
|
|
8
10
|
const arger = mapping[1];
|
|
9
11
|
|
|
10
12
|
if (prop === method) {
|
|
11
|
-
return (x) => target[prop](arger(x));
|
|
13
|
+
return (...x) => target[prop](arger(...x));
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
|
package/src/lib/types.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { PM_Node } from "../PM/node";
|
|
2
3
|
import { PM_Pure } from "../PM/pure";
|
|
3
4
|
import { PM_Web } from "../PM/web";
|
|
4
|
-
import { IT, OT } from "../Types";
|
|
5
|
+
import type { IT, OT } from "../Types";
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
8
|
IGivens,
|
|
@@ -14,11 +15,23 @@ import {
|
|
|
14
15
|
|
|
15
16
|
export type IPM = PM_Node | PM_Web | PM_Pure;
|
|
16
17
|
|
|
18
|
+
export type TestPhase = 'beforeAll' | 'beforeEach' | 'test' | 'afterEach' | 'afterAll';
|
|
19
|
+
|
|
20
|
+
export type TestError = {
|
|
21
|
+
phase: TestPhase;
|
|
22
|
+
error: Error;
|
|
23
|
+
testName: string;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
stackTrace?: string;
|
|
26
|
+
additionalInfo?: Record<string, unknown>;
|
|
27
|
+
isRetryable?: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
17
30
|
export type ITestCheckCallback<I extends IT, O extends OT> = {
|
|
18
31
|
[K in keyof O["checks"]]: (
|
|
19
32
|
name: string,
|
|
20
33
|
features: string[],
|
|
21
|
-
checkCallback: (store: I["istore"], pm: IPM) => Promise<
|
|
34
|
+
checkCallback: (store: I["istore"], pm: IPM) => Promise<O["checks"][K]>,
|
|
22
35
|
|
|
23
36
|
...xtrasA: O["checks"][K]
|
|
24
37
|
) => BaseCheck<I>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
|
|
3
|
+
const app = express();
|
|
4
|
+
|
|
5
|
+
app.get("/", (req, res) => {
|
|
6
|
+
res.send("Hello World!");
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export default (port: number) => {
|
|
10
|
+
app.listen(port, () => {
|
|
11
|
+
console.log(`Example app listening on port ${port}`);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
return app;
|
|
15
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
import { ITTestResourceConfiguration } from "../lib";
|
|
4
|
+
import { IPM } from "../lib/types";
|
|
5
|
+
import Testeranto from "../Node";
|
|
6
|
+
import { PM } from "../PM";
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Ibdd_out,
|
|
10
|
+
ITestSpecification,
|
|
11
|
+
IT,
|
|
12
|
+
ITestImplementation,
|
|
13
|
+
Ibdd_in,
|
|
14
|
+
IPartialNodeInterface,
|
|
15
|
+
} from "../Types";
|
|
16
|
+
|
|
17
|
+
import appFactory from "./index";
|
|
18
|
+
|
|
19
|
+
import type { Express } from "express";
|
|
20
|
+
|
|
21
|
+
type I = Ibdd_in<
|
|
22
|
+
(port: number) => Express,
|
|
23
|
+
(port: number) => Express,
|
|
24
|
+
any,
|
|
25
|
+
any,
|
|
26
|
+
any,
|
|
27
|
+
any,
|
|
28
|
+
any
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
type O = Ibdd_out<
|
|
32
|
+
{
|
|
33
|
+
TheMothership: [null];
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
ItIsRunning: [];
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
IClaimTheResource: [string];
|
|
40
|
+
IReleaseTheResource: [string];
|
|
41
|
+
IResetTheResource: [string];
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
TheResourceIsClaimed: [string];
|
|
45
|
+
TheResourceIsUnClaimed: [string];
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
AnEmptyState;
|
|
49
|
+
}
|
|
50
|
+
>;
|
|
51
|
+
|
|
52
|
+
const specification: ITestSpecification<IT, O> = (Suite, Given, When, Then) => {
|
|
53
|
+
console.log("Suite", Suite);
|
|
54
|
+
return [
|
|
55
|
+
Suite.TheMothership(
|
|
56
|
+
"the mothership allows the coordination of test resources",
|
|
57
|
+
{
|
|
58
|
+
test0: Given.ItIsRunning(
|
|
59
|
+
[`a resource can be claimed`],
|
|
60
|
+
[When.IClaimTheResource("test")],
|
|
61
|
+
[
|
|
62
|
+
// Then.TheResourceIsClaimed("test")
|
|
63
|
+
]
|
|
64
|
+
),
|
|
65
|
+
},
|
|
66
|
+
[]
|
|
67
|
+
),
|
|
68
|
+
];
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const implementation: ITestImplementation<I, O> = {
|
|
72
|
+
suites: { TheMothership: (x) => x },
|
|
73
|
+
givens: { ItIsRunning: () => undefined },
|
|
74
|
+
whens: {
|
|
75
|
+
IClaimTheResource: (resource) => async (i, tr, p) => {
|
|
76
|
+
fetch(`http://localhost:${tr.ports[0]}/claim?${resource}`);
|
|
77
|
+
},
|
|
78
|
+
IReleaseTheResource: function (
|
|
79
|
+
resource: string
|
|
80
|
+
): (zel, tr, utils) => Promise<any> {
|
|
81
|
+
throw new Error("Function not implemented.");
|
|
82
|
+
},
|
|
83
|
+
IResetTheResource: function (
|
|
84
|
+
Iw_0: string
|
|
85
|
+
): (zel: any, tr, utils: PM) => Promise<any> {
|
|
86
|
+
throw new Error("Function not implemented.");
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
thens: {
|
|
90
|
+
TheResourceIsClaimed: (resource) => async (z, u) => {
|
|
91
|
+
throw new Error("Function not implemented.");
|
|
92
|
+
},
|
|
93
|
+
TheResourceIsUnClaimed: function (
|
|
94
|
+
It_0: string
|
|
95
|
+
): (ssel: any, utils: PM) => any {
|
|
96
|
+
throw new Error("Function not implemented.");
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
checks: { AnEmptyState: () => "any" },
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const testInterface: IPartialNodeInterface<I> = {
|
|
103
|
+
// assertThis: function (x: any) {
|
|
104
|
+
// throw new Error("Function not implemented.");
|
|
105
|
+
// },
|
|
106
|
+
// andWhen: function (store: any, whenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
107
|
+
// throw new Error("Function not implemented.");
|
|
108
|
+
// },
|
|
109
|
+
// butThen: function (store: any, thenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
110
|
+
// throw new Error("Function not implemented.");
|
|
111
|
+
// },
|
|
112
|
+
// afterAll: function (store: any, pm: IPM) {
|
|
113
|
+
// throw new Error("Function not implemented.");
|
|
114
|
+
// },
|
|
115
|
+
// afterEach: function (store: any, key: string, pm: IPM): Promise<unknown> {
|
|
116
|
+
// throw new Error("Function not implemented.");
|
|
117
|
+
// },
|
|
118
|
+
// beforeAll: function (input: Express, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
119
|
+
// throw new Error("Function not implemented.");
|
|
120
|
+
// },
|
|
121
|
+
beforeEach: async (
|
|
122
|
+
subject,
|
|
123
|
+
initializer: (c?: any) => any,
|
|
124
|
+
testResource: ITTestResourceConfiguration,
|
|
125
|
+
initialValues: any,
|
|
126
|
+
pm: IPM
|
|
127
|
+
) => {
|
|
128
|
+
return subject(testResource.ports[0]);
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export default Testeranto(
|
|
133
|
+
appFactory,
|
|
134
|
+
specification,
|
|
135
|
+
implementation,
|
|
136
|
+
testInterface
|
|
137
|
+
);
|
package/src/run.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export class Queue<I> {
|
|
2
|
+
items: I[];
|
|
3
|
+
|
|
4
|
+
constructor() {
|
|
5
|
+
this.items = [];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
enqueue(element) {
|
|
9
|
+
this.items.push(element);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
dequeue() {
|
|
13
|
+
if (this.isEmpty()) {
|
|
14
|
+
return "Queue is empty";
|
|
15
|
+
}
|
|
16
|
+
return this.items.shift();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
peek() {
|
|
20
|
+
if (this.isEmpty()) {
|
|
21
|
+
return "Queue is empty";
|
|
22
|
+
}
|
|
23
|
+
return this.items[0];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
isEmpty() {
|
|
27
|
+
return this.items.length === 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
size() {
|
|
31
|
+
return this.items.length;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
clear() {
|
|
35
|
+
this.items = [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
print() {
|
|
39
|
+
console.log(this.items.join(" -> "));
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/utils.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import path from "path";
|
|
2
3
|
|
|
3
4
|
import { IBuiltConfig, IRunTime, ITestTypes } from "./Types";
|
|
4
5
|
import { IRunnables } from "./lib";
|
|
5
6
|
|
|
6
|
-
export type ISummary = Record<
|
|
7
|
-
string,
|
|
8
|
-
{
|
|
9
|
-
runTimeError?: number | "?";
|
|
10
|
-
typeErrors?: number | "?";
|
|
11
|
-
staticErrors?: number | "?";
|
|
12
|
-
prompt?: string | "?";
|
|
13
|
-
}
|
|
14
|
-
>;
|
|
15
|
-
|
|
16
7
|
export const destinationOfRuntime = (
|
|
17
8
|
f: string,
|
|
18
9
|
r: IRunTime,
|
|
@@ -90,8 +81,11 @@ export const getRunnables = (
|
|
|
90
81
|
projectName: string,
|
|
91
82
|
payload = {
|
|
92
83
|
nodeEntryPoints: {},
|
|
84
|
+
nodeEntryPointSidecars: {},
|
|
93
85
|
webEntryPoints: {},
|
|
94
|
-
|
|
86
|
+
webEntryPointSidecars: {},
|
|
87
|
+
pureEntryPoints: {},
|
|
88
|
+
pureEntryPointSidecars: {},
|
|
95
89
|
}
|
|
96
90
|
): IRunnables => {
|
|
97
91
|
return tests.reduce((pt, cv, cndx, cry) => {
|
|
@@ -112,7 +106,7 @@ export const getRunnables = (
|
|
|
112
106
|
.join(".")}`
|
|
113
107
|
);
|
|
114
108
|
} else if (cv[1] === "pure") {
|
|
115
|
-
pt.
|
|
109
|
+
pt.pureEntryPoints[cv[0]] = path.resolve(
|
|
116
110
|
`./testeranto/bundles/pure/${projectName}/${cv[0]
|
|
117
111
|
.split(".")
|
|
118
112
|
.slice(0, -1)
|
|
@@ -121,9 +115,41 @@ export const getRunnables = (
|
|
|
121
115
|
);
|
|
122
116
|
}
|
|
123
117
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
//////////////////////////////////////////////////////////
|
|
119
|
+
|
|
120
|
+
cv[3]
|
|
121
|
+
.filter((t) => t[1] === "node")
|
|
122
|
+
.forEach((t) => {
|
|
123
|
+
pt.nodeEntryPointSidecars[`${t[0]}`] = path.resolve(
|
|
124
|
+
`./testeranto/bundles/node/${projectName}/${cv[0]
|
|
125
|
+
.split(".")
|
|
126
|
+
.slice(0, -1)
|
|
127
|
+
.concat("mjs")
|
|
128
|
+
.join(".")}`
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
cv[3]
|
|
132
|
+
.filter((t) => t[1] === "web")
|
|
133
|
+
.forEach((t) => {
|
|
134
|
+
pt.webEntryPointSidecars[`${t[0]}`] = path.resolve(
|
|
135
|
+
`./testeranto/bundles/web/${projectName}/${cv[0]
|
|
136
|
+
.split(".")
|
|
137
|
+
.slice(0, -1)
|
|
138
|
+
.concat("mjs")
|
|
139
|
+
.join(".")}`
|
|
140
|
+
);
|
|
141
|
+
});
|
|
142
|
+
cv[3]
|
|
143
|
+
.filter((t) => t[1] === "pure")
|
|
144
|
+
.forEach((t) => {
|
|
145
|
+
pt.pureEntryPointSidecars[`${t[0]}`] = path.resolve(
|
|
146
|
+
`./testeranto/bundles/pure/${projectName}/${cv[0]
|
|
147
|
+
.split(".")
|
|
148
|
+
.slice(0, -1)
|
|
149
|
+
.concat("mjs")
|
|
150
|
+
.join(".")}`
|
|
151
|
+
);
|
|
152
|
+
});
|
|
127
153
|
|
|
128
154
|
return pt;
|
|
129
155
|
}, payload as IRunnables);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/PM/sidecar.ts
|
|
4
|
+
var PM_sidecar = class {
|
|
5
|
+
testArtiFactoryfileWriter(tLog, callback) {
|
|
6
|
+
return (fPath, value) => {
|
|
7
|
+
callback(Promise.resolve());
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
// abstract $(selector: string): any;
|
|
11
|
+
// abstract click(selector: string): any;
|
|
12
|
+
// abstract closePage(p): any;
|
|
13
|
+
// abstract createWriteStream(
|
|
14
|
+
// filepath: string,
|
|
15
|
+
// testName: string
|
|
16
|
+
// ): Promise<string>;
|
|
17
|
+
// abstract customclose();
|
|
18
|
+
// abstract customScreenShot(opts: object, page?: string): any;
|
|
19
|
+
// abstract end(uid: number): Promise<boolean>;
|
|
20
|
+
// abstract existsSync(fp: string): Promise<boolean>;
|
|
21
|
+
// abstract focusOn(selector: string): any;
|
|
22
|
+
// abstract getAttribute(selector: string, attribute: string): any;
|
|
23
|
+
// abstract getValue(value: string): any;
|
|
24
|
+
// abstract goto(p, url: string): any;
|
|
25
|
+
// abstract isDisabled(selector: string): Promise<boolean>;
|
|
26
|
+
// abstract mkdirSync(a: string);
|
|
27
|
+
// abstract newPage(): Promise<string>;
|
|
28
|
+
// abstract page(): Promise<string | undefined>;
|
|
29
|
+
// abstract pages(): Promise<string[]>;
|
|
30
|
+
// abstract screencast(o: ScreenRecorderOptions, p: Page | string): any;
|
|
31
|
+
// abstract screencastStop(s: string): any;
|
|
32
|
+
// abstract typeInto(selector: string, value: string): any;
|
|
33
|
+
// abstract waitForSelector(p, sel: string);
|
|
34
|
+
// abstract write(uid: number, contents: string): Promise<boolean>;
|
|
35
|
+
// abstract writeFileSync(f: string, c: string, t: string): Promise<boolean>;
|
|
36
|
+
// abstract launchSideCar(
|
|
37
|
+
// n: number
|
|
38
|
+
// ): Promise<[number, ITTestResourceConfiguration]>;
|
|
39
|
+
// abstract stopSideCar(n: number): Promise<any>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
PM_sidecar
|
|
44
|
+
};
|