testeranto 0.128.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 +560 -19
- 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 +488 -422
- 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 +489 -423
- 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 +696 -404
- 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 +617 -578
- 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
package/src/Types.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { Plugin } from "esbuild";
|
|
2
|
-
|
|
3
3
|
import { ITTestResourceConfiguration } from "./lib/index.js";
|
|
4
|
+
import { PM } from "./PM/index.js";
|
|
5
|
+
import { IT, OT } from "../dist/types/src/Types.js";
|
|
4
6
|
import {
|
|
5
7
|
IGivens,
|
|
6
8
|
BaseCheck,
|
|
@@ -9,144 +11,217 @@ import {
|
|
|
9
11
|
BaseThen,
|
|
10
12
|
BaseGiven,
|
|
11
13
|
} from "./lib/abstractBase.js";
|
|
12
|
-
import {
|
|
13
|
-
import { PM } from "./PM/index.js";
|
|
14
|
+
import { ITestCheckCallback } from "./lib/types.js";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
testResource: ITTestResourceConfiguration,
|
|
27
|
-
pm: IPM
|
|
28
|
-
) => Promise<I["iselection"]>;
|
|
29
|
-
afterAll: (store: I["istore"], pm: IPM) => any;
|
|
30
|
-
afterEach: (store: I["istore"], key: string, pm: IPM) => Promise<unknown>;
|
|
31
|
-
beforeAll: (
|
|
32
|
-
input: I["iinput"],
|
|
33
|
-
testResource: ITTestResourceConfiguration,
|
|
34
|
-
pm: IPM
|
|
35
|
-
) => Promise<I["isubject"]>;
|
|
36
|
-
beforeEach: (
|
|
37
|
-
subject: I["isubject"],
|
|
38
|
-
initializer: (c?) => I["given"],
|
|
39
|
-
testResource: ITTestResourceConfiguration,
|
|
40
|
-
initialValues,
|
|
41
|
-
pm: IPM
|
|
42
|
-
) => Promise<I["istore"]>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export type IWebTestInterface<I extends IT> = ITestInterface<I>;
|
|
46
|
-
|
|
47
|
-
export type INodeTestInterface<I extends IT> = ITestInterface<I>;
|
|
48
|
-
|
|
49
|
-
export type IPartialInterface<I extends IT> = Partial<ITestInterface<I>>;
|
|
50
|
-
|
|
51
|
-
export type IPartialNodeInterface<I extends IT> = Partial<
|
|
52
|
-
INodeTestInterface<I>
|
|
53
|
-
>;
|
|
54
|
-
export type IPartialWebInterface<I extends IT> = Partial<IWebTestInterface<I>>;
|
|
16
|
+
// Simplified test result summary
|
|
17
|
+
export type TestSummary = {
|
|
18
|
+
testName: string;
|
|
19
|
+
errors?: {
|
|
20
|
+
runtime?: number;
|
|
21
|
+
type?: number;
|
|
22
|
+
static?: number;
|
|
23
|
+
};
|
|
24
|
+
prompt?: string;
|
|
25
|
+
failedFeatures: string[];
|
|
26
|
+
};
|
|
55
27
|
|
|
56
|
-
|
|
28
|
+
// Core test lifecycle hooks
|
|
29
|
+
export type TestLifecycle<Subject, State, Selection> = {
|
|
30
|
+
// Setup
|
|
31
|
+
beforeAll?: (input: any) => Promise<Subject>;
|
|
32
|
+
beforeEach?: (subject: Subject) => Promise<State>;
|
|
57
33
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
unknown,
|
|
62
|
-
unknown,
|
|
63
|
-
unknown,
|
|
64
|
-
unknown,
|
|
65
|
-
unknown
|
|
66
|
-
>;
|
|
34
|
+
// Execution
|
|
35
|
+
executeStep?: (state: State) => Promise<State>;
|
|
36
|
+
verifyStep?: (state: State) => Promise<Selection>;
|
|
67
37
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
38
|
+
// Cleanup
|
|
39
|
+
afterEach?: (state: State) => Promise<void>;
|
|
40
|
+
afterAll?: (state: State) => Promise<void>;
|
|
41
|
+
|
|
42
|
+
// Assertions
|
|
43
|
+
assert?: (result: Selection) => void;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// BDD Test Structure
|
|
47
|
+
export type TestDefinition<Subject, State, Selection> = {
|
|
48
|
+
// Test subject
|
|
49
|
+
subject: Subject;
|
|
50
|
+
|
|
51
|
+
// Test steps
|
|
52
|
+
given?: (input: any) => State;
|
|
53
|
+
when?: (state: State) => State | Promise<State>;
|
|
54
|
+
then?: (state: State) => Selection | Promise<Selection>;
|
|
55
|
+
|
|
56
|
+
// Configuration
|
|
57
|
+
resources?: ITTestResourceConfiguration;
|
|
58
|
+
pm?: typeof PM;
|
|
59
|
+
};
|
|
75
60
|
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
61
|
+
// Test Suite Organization
|
|
62
|
+
export type TestSuite = {
|
|
63
|
+
name: string;
|
|
64
|
+
tests: TestDefinition<any, any, any>[];
|
|
65
|
+
features?: string[];
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// Runtime Configuration
|
|
69
|
+
export type RuntimeConfig = {
|
|
70
|
+
type: "node" | "web" | "pure" | "spawn";
|
|
71
|
+
ports?: number[];
|
|
72
|
+
plugins?: Plugin[];
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// Project Configuration
|
|
76
|
+
export type ProjectConfig = {
|
|
77
|
+
name: string;
|
|
78
|
+
sourceDir: string;
|
|
79
|
+
testSuites: TestSuite[];
|
|
80
|
+
runtime: RuntimeConfig;
|
|
81
|
+
minify?: boolean;
|
|
82
|
+
debug?: boolean;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Specification component types
|
|
86
|
+
export type SuiteSpecification<I extends IT, O extends OT> = {
|
|
87
|
+
[K in keyof O["suites"]]: (
|
|
88
|
+
name: string,
|
|
89
|
+
givens: IGivens<I>,
|
|
90
|
+
checks: BaseCheck<I>[]
|
|
91
|
+
) => BaseSuite<I, O>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type GivenSpecification<I extends IT, O extends OT> = {
|
|
95
|
+
[K in keyof O["givens"]]: (
|
|
96
|
+
features: string[],
|
|
97
|
+
whens: BaseWhen<I>[],
|
|
98
|
+
thens: BaseThen<I>[],
|
|
99
|
+
...xtrasB: O["givens"][K]
|
|
100
|
+
) => BaseGiven<I>;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export type WhenSpecification<I extends IT, O extends OT> = {
|
|
104
|
+
[K in keyof O["whens"]]: (...xtrasC: O["whens"][K]) => BaseWhen<I>;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type ThenSpecification<I extends IT, O extends OT> = {
|
|
108
|
+
[K in keyof O["thens"]]: (...xtrasD: O["thens"][K]) => BaseThen<I>;
|
|
109
|
+
};
|
|
83
110
|
|
|
111
|
+
// Complete test specification
|
|
84
112
|
export type ITestSpecification<I extends IT, O extends OT> = (
|
|
85
|
-
Suite:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
checks: BaseCheck<I>[]
|
|
90
|
-
) => BaseSuite<I, O>;
|
|
91
|
-
},
|
|
92
|
-
Given: {
|
|
93
|
-
[K in keyof O["givens"]]: (
|
|
94
|
-
features: string[],
|
|
95
|
-
whens: BaseWhen<I>[],
|
|
96
|
-
thens: BaseThen<I>[],
|
|
97
|
-
...xtrasB: O["givens"][K]
|
|
98
|
-
) => BaseGiven<I>;
|
|
99
|
-
},
|
|
100
|
-
When: {
|
|
101
|
-
[K in keyof O["whens"]]: (...xtrasC: O["whens"][K]) => BaseWhen<I>;
|
|
102
|
-
},
|
|
103
|
-
Then: {
|
|
104
|
-
[K in keyof O["thens"]]: (...xtrasD: O["thens"][K]) => BaseThen<I>;
|
|
105
|
-
},
|
|
113
|
+
Suite: SuiteSpecification<I, O>,
|
|
114
|
+
Given: GivenSpecification<I, O>,
|
|
115
|
+
When: WhenSpecification<I, O>,
|
|
116
|
+
Then: ThenSpecification<I, O>,
|
|
106
117
|
Check: ITestCheckCallback<I, O>
|
|
107
118
|
) => any[];
|
|
108
119
|
|
|
109
120
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
110
121
|
|
|
122
|
+
// Base implementation types
|
|
123
|
+
export type TestSuiteImplementation<O extends OT> = {
|
|
124
|
+
[K in keyof O["suites"]]: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type TestGivenImplementation<I extends IT, O extends OT> = {
|
|
128
|
+
[K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export type TestWhenImplementation<I extends IT, O extends OT> = {
|
|
132
|
+
[K in keyof O["whens"]]: (
|
|
133
|
+
...Iw: O["whens"][K]
|
|
134
|
+
) => (
|
|
135
|
+
zel: I["iselection"],
|
|
136
|
+
tr: ITTestResourceConfiguration,
|
|
137
|
+
utils: PM
|
|
138
|
+
) => Promise<I["when"]>;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type TestThenImplementation<I extends IT, O extends OT> = {
|
|
142
|
+
[K in keyof O["thens"]]: (
|
|
143
|
+
...It: O["thens"][K]
|
|
144
|
+
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export type TestCheckImplementation<I extends IT, O extends OT> = {
|
|
148
|
+
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// Complete test implementation
|
|
111
152
|
export type ITestImplementation<
|
|
112
153
|
I extends IT,
|
|
113
154
|
O extends OT,
|
|
114
|
-
modifier = {
|
|
155
|
+
modifier = {
|
|
156
|
+
whens: TestWhenImplementation<I, O>;
|
|
157
|
+
}
|
|
115
158
|
> = Modify<
|
|
116
159
|
{
|
|
117
|
-
suites:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
whens: {
|
|
124
|
-
[K in keyof O["whens"]]: (
|
|
125
|
-
...Iw: O["whens"][K]
|
|
126
|
-
) => (zel: I["iselection"], utils: PM) => Promise<I["when"]>;
|
|
127
|
-
};
|
|
128
|
-
thens: {
|
|
129
|
-
[K in keyof O["thens"]]: (
|
|
130
|
-
...It: O["thens"][K]
|
|
131
|
-
) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
132
|
-
};
|
|
133
|
-
checks: {
|
|
134
|
-
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
135
|
-
};
|
|
160
|
+
suites: TestSuiteImplementation<O>;
|
|
161
|
+
givens: TestGivenImplementation<I, O>;
|
|
162
|
+
whens: TestWhenImplementation<I, O>;
|
|
163
|
+
thens: TestThenImplementation<I, O>;
|
|
164
|
+
checks: TestCheckImplementation<I, O>;
|
|
136
165
|
},
|
|
137
166
|
modifier
|
|
138
167
|
>;
|
|
139
168
|
|
|
169
|
+
// export type ITestImplementation<
|
|
170
|
+
// I extends IT,
|
|
171
|
+
// O extends OT,
|
|
172
|
+
// modifier = Partial<{
|
|
173
|
+
// // givens: string;
|
|
174
|
+
// givens: {
|
|
175
|
+
// [K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
176
|
+
// };
|
|
177
|
+
// }>
|
|
178
|
+
// > = Modify<
|
|
179
|
+
// {
|
|
180
|
+
// // suites: {
|
|
181
|
+
// // // [K in keyof O["suites"]]: unknown;
|
|
182
|
+
// // [K in keyof O["suites"]]: (...Ig: O["suites"][K]) => I["suites"];
|
|
183
|
+
// // };
|
|
184
|
+
// // suites: [];
|
|
185
|
+
|
|
186
|
+
// // givens: {
|
|
187
|
+
// // [K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
188
|
+
// // };
|
|
189
|
+
|
|
190
|
+
// whens: {
|
|
191
|
+
// [K in keyof O["whens"]]: (
|
|
192
|
+
// ...Iw: O["whens"][K]
|
|
193
|
+
// ) => (zel: I["iselection"], utils: PM) => Promise<I["when"]>;
|
|
194
|
+
// };
|
|
195
|
+
// thens: {
|
|
196
|
+
// [K in keyof O["thens"]]: (
|
|
197
|
+
// ...It: O["thens"][K]
|
|
198
|
+
// ) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
199
|
+
// };
|
|
200
|
+
// checks: {
|
|
201
|
+
// [K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
202
|
+
// };
|
|
203
|
+
// },
|
|
204
|
+
// modifier
|
|
205
|
+
// >;
|
|
206
|
+
|
|
140
207
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
141
208
|
|
|
142
209
|
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
143
210
|
|
|
211
|
+
// Individual output shape components
|
|
212
|
+
export type TestSuiteShape = Record<string, any>;
|
|
213
|
+
export type TestGivenShape = Record<string, any>;
|
|
214
|
+
export type TestWhenShape = Record<string, any>;
|
|
215
|
+
export type TestThenShape = Record<string, any>;
|
|
216
|
+
export type TestCheckShape = Record<string, any>;
|
|
217
|
+
|
|
218
|
+
// Complete BDD output shape
|
|
144
219
|
export type Ibdd_out<
|
|
145
|
-
ISuites extends
|
|
146
|
-
IGivens extends
|
|
147
|
-
IWhens extends
|
|
148
|
-
IThens extends
|
|
149
|
-
IChecks extends
|
|
220
|
+
ISuites extends TestSuiteShape = TestSuiteShape,
|
|
221
|
+
IGivens extends TestGivenShape = TestGivenShape,
|
|
222
|
+
IWhens extends TestWhenShape = TestWhenShape,
|
|
223
|
+
IThens extends TestThenShape = TestThenShape,
|
|
224
|
+
IChecks extends TestCheckShape = TestCheckShape
|
|
150
225
|
> = {
|
|
151
226
|
suites: ISuites;
|
|
152
227
|
givens: IGivens;
|
|
@@ -155,24 +230,54 @@ export type Ibdd_out<
|
|
|
155
230
|
checks: IChecks;
|
|
156
231
|
};
|
|
157
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Defines the input shape for BDD test definitions.
|
|
235
|
+
* This is the core type that structures all test operations.
|
|
236
|
+
*/
|
|
158
237
|
export type Ibdd_in<
|
|
159
|
-
IInput,
|
|
160
|
-
ISubject,
|
|
161
|
-
IStore,
|
|
162
|
-
ISelection,
|
|
163
|
-
IGiven,
|
|
164
|
-
IWhen,
|
|
165
|
-
IThen
|
|
238
|
+
IInput, // Type of initial test input
|
|
239
|
+
ISubject, // Type of object being tested
|
|
240
|
+
IStore, // Type for storing test state between steps
|
|
241
|
+
ISelection, // Type for selecting state for assertions
|
|
242
|
+
IGiven, // Type for Given step functions
|
|
243
|
+
IWhen, // Type for When step functions
|
|
244
|
+
IThen // Type for Then step functions
|
|
166
245
|
> = {
|
|
246
|
+
/** Initial input required to start tests */
|
|
167
247
|
iinput: IInput;
|
|
248
|
+
|
|
249
|
+
/** The subject being tested (class, function, etc) */
|
|
168
250
|
isubject: ISubject;
|
|
251
|
+
|
|
252
|
+
/** Complete test state storage */
|
|
169
253
|
istore: IStore;
|
|
254
|
+
|
|
255
|
+
/** Selected portion of state for assertions */
|
|
170
256
|
iselection: ISelection;
|
|
257
|
+
|
|
258
|
+
/** Function type for Given steps */
|
|
171
259
|
given: IGiven;
|
|
260
|
+
|
|
261
|
+
/** Function type for When steps */
|
|
172
262
|
when: IWhen;
|
|
263
|
+
|
|
264
|
+
/** Function type for Then steps */
|
|
173
265
|
then: IThen;
|
|
174
266
|
};
|
|
175
267
|
|
|
268
|
+
// Example usage:
|
|
269
|
+
/*
|
|
270
|
+
type CounterTest = Ibdd_in<
|
|
271
|
+
number, // Initial count value
|
|
272
|
+
Counter, // Test subject is Counter class
|
|
273
|
+
{ counter: Counter, env: any }, // Store counter + environment
|
|
274
|
+
number, // Assert against current count
|
|
275
|
+
(init: number) => Counter, // Given creates Counter
|
|
276
|
+
(delta: number) => (c: Counter) => void, // When modifies Counter
|
|
277
|
+
(expected: number) => (c: Counter) => void // Then asserts count
|
|
278
|
+
>;
|
|
279
|
+
*/
|
|
280
|
+
|
|
176
281
|
///////////////////////////////////////////////
|
|
177
282
|
|
|
178
283
|
export type IPluginFactory = (
|
|
@@ -180,7 +285,7 @@ export type IPluginFactory = (
|
|
|
180
285
|
entrypoints?: string[]
|
|
181
286
|
) => Plugin;
|
|
182
287
|
|
|
183
|
-
export type IRunTime = `node` | `web` | "pure"
|
|
288
|
+
export type IRunTime = `node` | `web` | "pure" | `spawn`;
|
|
184
289
|
|
|
185
290
|
export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
|
|
186
291
|
|
|
@@ -188,6 +293,7 @@ export type ITestconfig = {
|
|
|
188
293
|
clearScreen: boolean;
|
|
189
294
|
debugger: boolean;
|
|
190
295
|
externals: string[];
|
|
296
|
+
externalTests: Record<string, { watch: string[]; exec: string }>;
|
|
191
297
|
featureIngestor: (s: string) => Promise<string>;
|
|
192
298
|
importPlugins: IPluginFactory[];
|
|
193
299
|
minify: boolean;
|
|
@@ -196,7 +302,6 @@ export type ITestconfig = {
|
|
|
196
302
|
src: string;
|
|
197
303
|
tests: ITestTypes[];
|
|
198
304
|
webPlugins: IPluginFactory[];
|
|
199
|
-
reportDomain: string;
|
|
200
305
|
};
|
|
201
306
|
|
|
202
307
|
export type IBuiltConfig = { buildDir: string } & ITestconfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ITTestResourceConfiguration } from "./lib";
|
|
2
|
+
import { Sidecar } from "./lib/Sidecar";
|
|
3
|
+
import { PM_Web_Sidecar } from "./PM/webSidecar";
|
|
4
|
+
// import { PM_Node_Sidecar } from "./PM/nodeSidecar";
|
|
5
|
+
|
|
6
|
+
export class WebSideCar extends Sidecar {
|
|
7
|
+
start(t: ITTestResourceConfiguration) {
|
|
8
|
+
throw new Error("Method not implemented.");
|
|
9
|
+
}
|
|
10
|
+
stop() {
|
|
11
|
+
throw new Error("Method not implemented.");
|
|
12
|
+
}
|
|
13
|
+
pm: PM_Web_Sidecar;
|
|
14
|
+
}
|
package/src/build.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 ansiC from "ansi-colors";
|
|
2
4
|
import fs, { watch } from "fs";
|
|
3
5
|
import path from "path";
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
readline.emitKeypressEvents(process.stdin);
|
|
22
24
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
const testName = process.argv[2];
|
|
25
27
|
|
|
26
28
|
let mode = process.argv[3] as "once" | "dev";
|
|
27
29
|
if (mode !== "once" && mode !== "dev") {
|
|
@@ -58,6 +60,24 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
58
60
|
return Array.from(meta(config.tests, new Set()));
|
|
59
61
|
};
|
|
60
62
|
|
|
63
|
+
const getSideCars = (runtime?: IRunTime): string[] => {
|
|
64
|
+
return Array.from(
|
|
65
|
+
new Set(
|
|
66
|
+
config.tests
|
|
67
|
+
.reduce((mm, t) => {
|
|
68
|
+
mm = mm.concat(t[3]);
|
|
69
|
+
return mm;
|
|
70
|
+
}, [] as ITestTypes[])
|
|
71
|
+
.filter((t) => {
|
|
72
|
+
return t[1] === runtime;
|
|
73
|
+
})
|
|
74
|
+
.map((t) => {
|
|
75
|
+
return t[0];
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
61
81
|
const config: IBuiltConfig = {
|
|
62
82
|
...rawConfig,
|
|
63
83
|
buildDir: process.cwd() + "/testeranto/bundles/" + testName,
|
|
@@ -86,10 +106,19 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
86
106
|
|
|
87
107
|
let status: "build" | "built" = "build";
|
|
88
108
|
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
const {
|
|
110
|
+
nodeEntryPoints,
|
|
111
|
+
nodeEntryPointSidecars,
|
|
112
|
+
webEntryPoints,
|
|
113
|
+
webEntryPointSidecars,
|
|
114
|
+
pureEntryPoints,
|
|
115
|
+
pureEntryPointSidecars,
|
|
116
|
+
} = getRunnables(config.tests, testName);
|
|
117
|
+
|
|
118
|
+
// const { nodeEntryPointsSidecars, webEntryPointsSidecars, importEntryPointsSideCars } = getRunnableSidecars(
|
|
119
|
+
// config.tests,
|
|
120
|
+
// testName
|
|
121
|
+
// );
|
|
93
122
|
|
|
94
123
|
const onNodeDone = () => {
|
|
95
124
|
nodeDone = true;
|
|
@@ -116,6 +145,7 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
116
145
|
}
|
|
117
146
|
};
|
|
118
147
|
|
|
148
|
+
console.log(`testeranto/reports/${testName}`);
|
|
119
149
|
if (!fs.existsSync(`testeranto/reports/${testName}`)) {
|
|
120
150
|
fs.mkdirSync(`testeranto/reports/${testName}`);
|
|
121
151
|
}
|
|
@@ -224,12 +254,25 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
224
254
|
// });
|
|
225
255
|
|
|
226
256
|
const x: [IRunTime, string[]][] = [
|
|
227
|
-
["pure", Object.keys(
|
|
257
|
+
["pure", Object.keys(pureEntryPoints)],
|
|
228
258
|
["node", Object.keys(nodeEntryPoints)],
|
|
229
259
|
["web", Object.keys(webEntryPoints)],
|
|
260
|
+
// [
|
|
261
|
+
// "pure",
|
|
262
|
+
// [...Object.keys(pureEntryPoints), ...Object.keys(pureEntryPointSidecars)],
|
|
263
|
+
// ],
|
|
264
|
+
// [
|
|
265
|
+
// "node",
|
|
266
|
+
// [...Object.keys(nodeEntryPoints), ...Object.keys(nodeEntryPointSidecars)],
|
|
267
|
+
// ],
|
|
268
|
+
// [
|
|
269
|
+
// "web",
|
|
270
|
+
// [...Object.keys(webEntryPoints), ...Object.keys(webEntryPointSidecars)],
|
|
271
|
+
// ],
|
|
230
272
|
];
|
|
231
273
|
|
|
232
274
|
x.forEach(async ([runtime, keys]) => {
|
|
275
|
+
console.log(runtime, keys);
|
|
233
276
|
keys.forEach(async (k) => {
|
|
234
277
|
const folder = `testeranto/reports/${testName}/${k
|
|
235
278
|
.split(".")
|
|
@@ -250,8 +293,8 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
250
293
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
251
294
|
<meta name="author" content="" />
|
|
252
295
|
|
|
253
|
-
<link rel="stylesheet" href="
|
|
254
|
-
<script src="
|
|
296
|
+
<link rel="stylesheet" href="../../../../../../TestReport.css" />
|
|
297
|
+
<script src="../../../../../../TestReport.js"></script>
|
|
255
298
|
|
|
256
299
|
</head>
|
|
257
300
|
|
|
@@ -263,16 +306,60 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
263
306
|
});
|
|
264
307
|
});
|
|
265
308
|
|
|
309
|
+
[
|
|
310
|
+
[pureEntryPoints, pureEntryPointSidecars, "pure"],
|
|
311
|
+
[webEntryPoints, webEntryPointSidecars, "web"],
|
|
312
|
+
[nodeEntryPoints, nodeEntryPointSidecars, "node"],
|
|
313
|
+
].forEach(
|
|
314
|
+
([eps, eps2, runtime]: [
|
|
315
|
+
Record<string, string>,
|
|
316
|
+
Record<string, string>,
|
|
317
|
+
IRunTime
|
|
318
|
+
]) => {
|
|
319
|
+
[...Object.keys(eps), ...Object.keys(eps2)].forEach((ep) => {
|
|
320
|
+
const fp = path.resolve(
|
|
321
|
+
`testeranto`,
|
|
322
|
+
`reports`,
|
|
323
|
+
testName,
|
|
324
|
+
ep.split(".").slice(0, -1).join("."),
|
|
325
|
+
runtime
|
|
326
|
+
);
|
|
327
|
+
fs.mkdirSync(fp, { recursive: true });
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
|
|
266
332
|
await Promise.all([
|
|
267
333
|
...(
|
|
268
334
|
[
|
|
269
|
-
[
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
335
|
+
[
|
|
336
|
+
esbuildImportConfiger,
|
|
337
|
+
pureEntryPoints,
|
|
338
|
+
pureEntryPointSidecars,
|
|
339
|
+
onImportDone,
|
|
340
|
+
],
|
|
341
|
+
[
|
|
342
|
+
esbuildNodeConfiger,
|
|
343
|
+
nodeEntryPoints,
|
|
344
|
+
nodeEntryPointSidecars,
|
|
345
|
+
onNodeDone,
|
|
346
|
+
],
|
|
347
|
+
[esbuildWebConfiger, webEntryPoints, webEntryPointSidecars, onWebDone],
|
|
348
|
+
] as [
|
|
349
|
+
(a, b, c) => any,
|
|
350
|
+
Record<string, string>,
|
|
351
|
+
Record<string, string>,
|
|
352
|
+
() => void
|
|
353
|
+
][]
|
|
354
|
+
).map(([configer, entryPoints, sidecars, done]) => {
|
|
274
355
|
esbuild
|
|
275
|
-
.context(
|
|
356
|
+
.context(
|
|
357
|
+
configer(
|
|
358
|
+
config,
|
|
359
|
+
[...Object.keys(entryPoints), ...Object.keys(sidecars)],
|
|
360
|
+
testName
|
|
361
|
+
)
|
|
362
|
+
)
|
|
276
363
|
.then(async (ctx) => {
|
|
277
364
|
if (mode === "dev") {
|
|
278
365
|
await ctx.watch().then((v) => {
|
package/src/defaultConfig.ts
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Console Detector Plugin
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
This esbuild plugin detects usage of `console.*` methods in code that will run under the Pure runtime. Since Pure runtime doesn't allow IO operations, these calls will fail silently. The plugin provides warnings during build time to alert developers.
|
|
5
|
+
|
|
6
|
+
## Why This Exists
|
|
7
|
+
1. **Pure Runtime Constraints**:
|
|
8
|
+
- Pure runtime has no access to IO operations
|
|
9
|
+
- Console methods are IO operations
|
|
10
|
+
- Failed calls won't throw errors, just silently fail
|
|
11
|
+
|
|
12
|
+
2. **Developer Experience**:
|
|
13
|
+
- Catches issues at build time rather than runtime
|
|
14
|
+
- Clearly indicates which files/lines need attention
|
|
15
|
+
- Guides developers to use Node runtime when IO is needed
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
```javascript
|
|
19
|
+
import { consoleDetectorPlugin } from './consoleDetectorPlugin';
|
|
20
|
+
|
|
21
|
+
// Add to your esbuild config
|
|
22
|
+
esbuild.build({
|
|
23
|
+
plugins: [consoleDetectorPlugin],
|
|
24
|
+
// ... other config
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
- Scans all .js and .ts files
|
|
30
|
+
- Detects any `console.*` method calls
|
|
31
|
+
- Generates warnings with file locations
|
|
32
|
+
- Doesn't fail the build (just warns)
|
|
33
|
+
|
|
34
|
+
## Recommendations
|
|
35
|
+
1. For Pure runtime code:
|
|
36
|
+
- Remove all console.* calls
|
|
37
|
+
- Use alternative debugging methods
|
|
38
|
+
|
|
39
|
+
2. When you need console output:
|
|
40
|
+
- Switch to Node runtime
|
|
41
|
+
- Use the appropriate test interface
|
|
42
|
+
|
|
43
|
+
## Implementation Notes
|
|
44
|
+
- Uses esbuild's onLoad hook
|
|
45
|
+
- Checks for 20+ different console methods
|
|
46
|
+
- Provides exact line numbers for warnings
|