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/dist/common/src/build.js
CHANGED
|
@@ -36,6 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
40
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
39
41
|
const ansi_colors_1 = __importDefault(require("ansi-colors"));
|
|
40
42
|
const fs_1 = __importDefault(require("fs"));
|
|
41
43
|
const path_1 = __importDefault(require("path"));
|
|
@@ -49,7 +51,7 @@ const utils_js_1 = require("./utils.js");
|
|
|
49
51
|
readline_1.default.emitKeypressEvents(process.stdin);
|
|
50
52
|
if (process.stdin.isTTY)
|
|
51
53
|
process.stdin.setRawMode(true);
|
|
52
|
-
|
|
54
|
+
const testName = process.argv[2];
|
|
53
55
|
let mode = process.argv[3];
|
|
54
56
|
if (mode !== "once" && mode !== "dev") {
|
|
55
57
|
console.error(`The 4th argument should be 'dev' or 'once', not '${mode}'.`);
|
|
@@ -79,6 +81,19 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
79
81
|
};
|
|
80
82
|
return Array.from(meta(config.tests, new Set()));
|
|
81
83
|
};
|
|
84
|
+
const getSideCars = (runtime) => {
|
|
85
|
+
return Array.from(new Set(config.tests
|
|
86
|
+
.reduce((mm, t) => {
|
|
87
|
+
mm = mm.concat(t[3]);
|
|
88
|
+
return mm;
|
|
89
|
+
}, [])
|
|
90
|
+
.filter((t) => {
|
|
91
|
+
return t[1] === runtime;
|
|
92
|
+
})
|
|
93
|
+
.map((t) => {
|
|
94
|
+
return t[0];
|
|
95
|
+
})));
|
|
96
|
+
};
|
|
82
97
|
const config = Object.assign(Object.assign({}, rawConfig), { buildDir: process.cwd() + "/testeranto/bundles/" + testName });
|
|
83
98
|
console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
|
|
84
99
|
process.stdin.on("keypress", (str, key) => {
|
|
@@ -99,7 +114,11 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
99
114
|
let webDone = false;
|
|
100
115
|
let importDone = false;
|
|
101
116
|
let status = "build";
|
|
102
|
-
const { nodeEntryPoints, webEntryPoints,
|
|
117
|
+
const { nodeEntryPoints, nodeEntryPointSidecars, webEntryPoints, webEntryPointSidecars, pureEntryPoints, pureEntryPointSidecars, } = (0, utils_js_1.getRunnables)(config.tests, testName);
|
|
118
|
+
// const { nodeEntryPointsSidecars, webEntryPointsSidecars, importEntryPointsSideCars } = getRunnableSidecars(
|
|
119
|
+
// config.tests,
|
|
120
|
+
// testName
|
|
121
|
+
// );
|
|
103
122
|
const onNodeDone = () => {
|
|
104
123
|
nodeDone = true;
|
|
105
124
|
onDone();
|
|
@@ -121,6 +140,7 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
121
140
|
process.exit();
|
|
122
141
|
}
|
|
123
142
|
};
|
|
143
|
+
console.log(`testeranto/reports/${testName}`);
|
|
124
144
|
if (!fs_1.default.existsSync(`testeranto/reports/${testName}`)) {
|
|
125
145
|
fs_1.default.mkdirSync(`testeranto/reports/${testName}`);
|
|
126
146
|
}
|
|
@@ -159,13 +179,14 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
159
179
|
<title>${pckge.name} - testeranto</title>
|
|
160
180
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
161
181
|
<meta name="author" content="" />
|
|
182
|
+
<base href="https://adamwong246.github.io/spacetrash_v8" target="_blank">
|
|
162
183
|
|
|
163
184
|
<script type="application/json" id="bigConfig">
|
|
164
185
|
${JSON.stringify(Object.keys(bigConfig.projects))}
|
|
165
186
|
</script>
|
|
166
187
|
|
|
167
|
-
<link rel="stylesheet" href="Project.css" />
|
|
168
|
-
<script type="module" src="Project.js"></script>
|
|
188
|
+
<link rel="stylesheet" href="/reports/Project.css" />
|
|
189
|
+
<script type="module" src="/reports/Project.js"></script>
|
|
169
190
|
|
|
170
191
|
</head>
|
|
171
192
|
|
|
@@ -199,11 +220,24 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
199
220
|
// });
|
|
200
221
|
// });
|
|
201
222
|
const x = [
|
|
202
|
-
["pure", Object.keys(
|
|
223
|
+
["pure", Object.keys(pureEntryPoints)],
|
|
203
224
|
["node", Object.keys(nodeEntryPoints)],
|
|
204
225
|
["web", Object.keys(webEntryPoints)],
|
|
226
|
+
// [
|
|
227
|
+
// "pure",
|
|
228
|
+
// [...Object.keys(pureEntryPoints), ...Object.keys(pureEntryPointSidecars)],
|
|
229
|
+
// ],
|
|
230
|
+
// [
|
|
231
|
+
// "node",
|
|
232
|
+
// [...Object.keys(nodeEntryPoints), ...Object.keys(nodeEntryPointSidecars)],
|
|
233
|
+
// ],
|
|
234
|
+
// [
|
|
235
|
+
// "web",
|
|
236
|
+
// [...Object.keys(webEntryPoints), ...Object.keys(webEntryPointSidecars)],
|
|
237
|
+
// ],
|
|
205
238
|
];
|
|
206
239
|
x.forEach(async ([runtime, keys]) => {
|
|
240
|
+
console.log(runtime, keys);
|
|
207
241
|
keys.forEach(async (k) => {
|
|
208
242
|
const folder = `testeranto/reports/${testName}/${k
|
|
209
243
|
.split(".")
|
|
@@ -221,8 +255,8 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
221
255
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
222
256
|
<meta name="author" content="" />
|
|
223
257
|
|
|
224
|
-
<link rel="stylesheet" href="
|
|
225
|
-
<script src="
|
|
258
|
+
<link rel="stylesheet" href="../../../../../../TestReport.css" />
|
|
259
|
+
<script src="../../../../../../TestReport.js"></script>
|
|
226
260
|
|
|
227
261
|
</head>
|
|
228
262
|
|
|
@@ -232,14 +266,34 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
232
266
|
`);
|
|
233
267
|
});
|
|
234
268
|
});
|
|
269
|
+
[
|
|
270
|
+
[pureEntryPoints, pureEntryPointSidecars, "pure"],
|
|
271
|
+
[webEntryPoints, webEntryPointSidecars, "web"],
|
|
272
|
+
[nodeEntryPoints, nodeEntryPointSidecars, "node"],
|
|
273
|
+
].forEach(([eps, eps2, runtime]) => {
|
|
274
|
+
[...Object.keys(eps), ...Object.keys(eps2)].forEach((ep) => {
|
|
275
|
+
const fp = path_1.default.resolve(`testeranto`, `reports`, testName, ep.split(".").slice(0, -1).join("."), runtime);
|
|
276
|
+
fs_1.default.mkdirSync(fp, { recursive: true });
|
|
277
|
+
});
|
|
278
|
+
});
|
|
235
279
|
await Promise.all([
|
|
236
280
|
...[
|
|
237
|
-
[
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
281
|
+
[
|
|
282
|
+
pure_js_1.default,
|
|
283
|
+
pureEntryPoints,
|
|
284
|
+
pureEntryPointSidecars,
|
|
285
|
+
onImportDone,
|
|
286
|
+
],
|
|
287
|
+
[
|
|
288
|
+
node_js_1.default,
|
|
289
|
+
nodeEntryPoints,
|
|
290
|
+
nodeEntryPointSidecars,
|
|
291
|
+
onNodeDone,
|
|
292
|
+
],
|
|
293
|
+
[web_js_1.default, webEntryPoints, webEntryPointSidecars, onWebDone],
|
|
294
|
+
].map(([configer, entryPoints, sidecars, done]) => {
|
|
241
295
|
esbuild_1.default
|
|
242
|
-
.context(configer(config, Object.keys(entryPoints), testName))
|
|
296
|
+
.context(configer(config, [...Object.keys(entryPoints), ...Object.keys(sidecars)], testName))
|
|
243
297
|
.then(async (ctx) => {
|
|
244
298
|
if (mode === "dev") {
|
|
245
299
|
await ctx.watch().then((v) => {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.consoleDetectorPlugin = void 0;
|
|
4
|
+
exports.consoleDetectorPlugin = {
|
|
5
|
+
name: 'console-detector',
|
|
6
|
+
setup(build) {
|
|
7
|
+
build.onLoad({ filter: /\.(js|ts)$/ }, async (args) => {
|
|
8
|
+
const contents = await require('fs').promises.readFile(args.path, 'utf8');
|
|
9
|
+
const consolePattern = /console\.(log|error|warn|info|debug|trace|dir|dirxml|table|group|groupEnd|clear|count|countReset|assert|profile|profileEnd|time|timeLog|timeEnd|timeStamp|context|memory)/g;
|
|
10
|
+
const matches = contents.match(consolePattern);
|
|
11
|
+
if (matches) {
|
|
12
|
+
const uniqueMethods = [...new Set(matches)];
|
|
13
|
+
return {
|
|
14
|
+
warnings: uniqueMethods.map(method => ({
|
|
15
|
+
text: `Detected ${method} call - Pure runtime does not allow IO operations. Use Node runtime instead.`,
|
|
16
|
+
location: {
|
|
17
|
+
file: args.path,
|
|
18
|
+
line: contents.split('\n').findIndex(line => line.includes(method)) + 1,
|
|
19
|
+
column: 0
|
|
20
|
+
}
|
|
21
|
+
}))
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -2,5 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
function default_1(results) {
|
|
5
|
-
return
|
|
5
|
+
return results
|
|
6
|
+
.filter((r) => r.messages.length)
|
|
7
|
+
.map((r) => {
|
|
8
|
+
const path = r.filePath.replace(process.cwd() + "/", "");
|
|
9
|
+
return [
|
|
10
|
+
path,
|
|
11
|
+
...r.messages.map((m) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return [
|
|
14
|
+
`${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
|
|
15
|
+
...(((_a = m.suggestions) === null || _a === void 0 ? void 0 : _a.map((s) => `- ${s.message}${s.fix ? " (fix)" : ""}`)) || []),
|
|
16
|
+
].join("\n");
|
|
17
|
+
}),
|
|
18
|
+
].join("\n");
|
|
19
|
+
})
|
|
20
|
+
.join("\n\n");
|
|
6
21
|
}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
7
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
|
|
9
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
9
10
|
exports.default = (config, entryPoints, testName) => {
|
|
10
11
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", testName);
|
|
11
12
|
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
@@ -19,22 +20,7 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
19
20
|
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
21
|
featuresPlugin_1.default,
|
|
21
22
|
inputFilesPluginFactory,
|
|
22
|
-
|
|
23
|
-
name: "rebuild-notify",
|
|
24
|
-
setup: (build) => {
|
|
25
|
-
build.onStart(() => {
|
|
26
|
-
console.log(`> node build starting...`);
|
|
27
|
-
});
|
|
28
|
-
build.onEnd((result) => {
|
|
29
|
-
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
30
|
-
if (result.errors.length > 0) {
|
|
31
|
-
console.log(result);
|
|
32
|
-
}
|
|
33
|
-
// console.log(result);
|
|
34
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
},
|
|
23
|
+
(0, rebuildPlugin_js_1.default)("node"),
|
|
38
24
|
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
39
25
|
] });
|
|
40
26
|
};
|
|
@@ -6,9 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
7
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
9
|
+
const node_module_1 = require("node:module");
|
|
10
|
+
const consoleDetectorPlugin_js_1 = require("./consoleDetectorPlugin.js");
|
|
11
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
9
12
|
exports.default = (config, entryPoints, testName) => {
|
|
10
13
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("pure", testName);
|
|
11
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { drop: [
|
|
14
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { drop: [], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
12
15
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
13
16
|
metafile: true, supported: {
|
|
14
17
|
"dynamic-import": true,
|
|
@@ -19,22 +22,19 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
19
22
|
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
23
|
featuresPlugin_js_1.default,
|
|
21
24
|
inputFilesPluginFactory,
|
|
25
|
+
consoleDetectorPlugin_js_1.consoleDetectorPlugin,
|
|
22
26
|
{
|
|
23
|
-
name: "
|
|
24
|
-
setup
|
|
25
|
-
build.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
build.onEnd((result) => {
|
|
29
|
-
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
30
|
-
if (result.errors.length > 0) {
|
|
31
|
-
console.log(result);
|
|
27
|
+
name: "native-node-import-filter",
|
|
28
|
+
setup(build) {
|
|
29
|
+
build.onResolve({ filter: /fs/ }, (args) => {
|
|
30
|
+
if ((0, node_module_1.isBuiltin)(args.path)) {
|
|
31
|
+
throw new Error(`cannot use native node package "${args.path}" in a "pure" test. If you really want to use this package, convert this test from "pure" to "node"`);
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
33
|
+
return { path: args.path };
|
|
35
34
|
});
|
|
36
35
|
},
|
|
37
36
|
},
|
|
37
|
+
(0, rebuildPlugin_js_1.default)("pure"),
|
|
38
38
|
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
39
39
|
[]),
|
|
40
40
|
] });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
exports.default = (r) => {
|
|
8
|
+
return {
|
|
9
|
+
name: "rebuild-notify",
|
|
10
|
+
setup: (build) => {
|
|
11
|
+
build.onStart(() => {
|
|
12
|
+
console.log(`> web build starting...`);
|
|
13
|
+
});
|
|
14
|
+
build.onEnd((result) => {
|
|
15
|
+
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
16
|
+
if (result.errors.length > 0) {
|
|
17
|
+
fs_1.default.writeFileSync(`./testeranto/reports${r}_build_errors`, JSON.stringify(result, null, 2));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -3,13 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const esbuild_plugin_polyfill_node_1 = require("esbuild-plugin-polyfill-node");
|
|
6
7
|
const path_1 = __importDefault(require("path"));
|
|
7
8
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
8
9
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
9
10
|
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
11
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
10
12
|
exports.default = (config, entryPoints, testName) => {
|
|
11
13
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web", testName);
|
|
12
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
14
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { treeShaking: true, outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
13
15
|
react: path_1.default.resolve("./node_modules/react"),
|
|
14
16
|
}, metafile: true, external: [
|
|
15
17
|
"path",
|
|
@@ -32,22 +34,15 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
32
34
|
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
33
35
|
featuresPlugin_js_1.default,
|
|
34
36
|
inputFilesPluginFactory,
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
console.log(result);
|
|
45
|
-
}
|
|
46
|
-
// console.log(result);
|
|
47
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
},
|
|
37
|
+
(0, esbuild_plugin_polyfill_node_1.polyfillNode)({
|
|
38
|
+
// You might need to configure specific Node.js modules you want to polyfill
|
|
39
|
+
// Example:
|
|
40
|
+
// modules: {
|
|
41
|
+
// 'util': true,
|
|
42
|
+
// 'fs': false,
|
|
43
|
+
// }
|
|
44
|
+
}),
|
|
45
|
+
(0, rebuildPlugin_js_1.default)("web"),
|
|
51
46
|
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
52
47
|
] });
|
|
53
48
|
};
|
|
@@ -57,7 +57,7 @@ class BaseSuite {
|
|
|
57
57
|
catch (e) {
|
|
58
58
|
this.failed = true;
|
|
59
59
|
this.fails = this.fails + 1;
|
|
60
|
-
|
|
60
|
+
console.error(e);
|
|
61
61
|
// this.fails.push(giver);
|
|
62
62
|
// return this;
|
|
63
63
|
}
|
|
@@ -105,7 +105,12 @@ class BaseGiven {
|
|
|
105
105
|
return {
|
|
106
106
|
key: this.key,
|
|
107
107
|
name: this.name,
|
|
108
|
-
whens: this.whens.map((w) =>
|
|
108
|
+
whens: this.whens.map((w) => {
|
|
109
|
+
if (w && w.toObj)
|
|
110
|
+
return w.toObj();
|
|
111
|
+
console.error("w is not as expected!", w);
|
|
112
|
+
return {};
|
|
113
|
+
}),
|
|
109
114
|
thens: this.thens.map((t) => t.toObj()),
|
|
110
115
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
111
116
|
failed: this.failed,
|
|
@@ -140,7 +145,7 @@ class BaseGiven {
|
|
|
140
145
|
}
|
|
141
146
|
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
142
147
|
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
|
|
143
|
-
|
|
148
|
+
tester(t);
|
|
144
149
|
// ((t) => {
|
|
145
150
|
// return tester(t);
|
|
146
151
|
// })();
|
|
@@ -172,16 +177,18 @@ class BaseWhen {
|
|
|
172
177
|
this.whenCB = whenCB;
|
|
173
178
|
}
|
|
174
179
|
toObj() {
|
|
180
|
+
console.log("toObj error", this.error);
|
|
175
181
|
return {
|
|
176
182
|
name: this.name,
|
|
177
|
-
error: this.error,
|
|
183
|
+
error: this.error && this.error.name + this.error.stack,
|
|
178
184
|
};
|
|
179
185
|
}
|
|
180
186
|
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
181
187
|
tLog(" When:", this.name);
|
|
182
188
|
return await this.andWhen(store, this.whenCB, testResourceConfiguration, (0, pmProxy_js_1.andWhenProxy)(pm, filepath)).catch((e) => {
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
console.log("MARK9", e);
|
|
190
|
+
this.error = e;
|
|
191
|
+
throw e;
|
|
185
192
|
});
|
|
186
193
|
}
|
|
187
194
|
}
|
|
@@ -28,15 +28,13 @@ class BaseBuilder {
|
|
|
28
28
|
},
|
|
29
29
|
runner,
|
|
30
30
|
receiveTestResourceConfig: async function (puppetMaster) {
|
|
31
|
-
const start = await puppetMaster.start();
|
|
32
31
|
const logFilePath = "log.txt";
|
|
33
32
|
const access = await puppetMaster.createWriteStream(logFilePath);
|
|
34
33
|
const tLog = async (...l) => {
|
|
35
|
-
const x = await puppetMaster.write(access, `${l.toString()}\n`);
|
|
36
34
|
// console.log("x", x);
|
|
37
35
|
};
|
|
38
36
|
const suiteDone = await runner(puppetMaster, tLog);
|
|
39
|
-
const logPromise = new Promise(async (res
|
|
37
|
+
const logPromise = new Promise(async (res) => {
|
|
40
38
|
await puppetMaster.end(access);
|
|
41
39
|
res(true);
|
|
42
40
|
});
|
|
@@ -11,34 +11,20 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
|
|
|
11
11
|
return a;
|
|
12
12
|
}, {});
|
|
13
13
|
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
14
|
-
a[key] = (features, whens, thens) => {
|
|
15
|
-
|
|
16
|
-
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key]
|
|
17
|
-
// givEn
|
|
18
|
-
);
|
|
14
|
+
a[key] = (features, whens, thens, ...initialValues) => {
|
|
15
|
+
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key], initialValues);
|
|
19
16
|
};
|
|
20
17
|
return a;
|
|
21
18
|
}, {});
|
|
22
19
|
const classyWhens = Object.entries(testImplementation.whens).reduce((a, [key, whEn]) => {
|
|
23
|
-
a[key] = (payload) => {
|
|
24
|
-
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(payload));
|
|
20
|
+
a[key] = (...payload) => {
|
|
21
|
+
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(...payload));
|
|
25
22
|
};
|
|
26
23
|
return a;
|
|
27
24
|
}, {});
|
|
28
25
|
const classyThens = Object.entries(testImplementation.thens).reduce((a, [key, thEn]) => {
|
|
29
|
-
a[key] = (expected, x) => {
|
|
30
|
-
return new thenKlasser.prototype.constructor(`${thEn.name}: ${expected && expected.toString()}`,
|
|
31
|
-
// () => {
|
|
32
|
-
// thEn(expected);
|
|
33
|
-
// // return new Promise((res), rej) => {
|
|
34
|
-
// // }
|
|
35
|
-
// // try {
|
|
36
|
-
// // thEn(expected);
|
|
37
|
-
// // } catch (c) {
|
|
38
|
-
// // console.log("mark99");
|
|
39
|
-
// // }
|
|
40
|
-
// },
|
|
41
|
-
thEn(expected));
|
|
26
|
+
a[key] = (expected, ...x) => {
|
|
27
|
+
return new thenKlasser.prototype.constructor(`${thEn.name}: ${expected && expected.toString()}`, thEn(expected, ...x));
|
|
42
28
|
};
|
|
43
29
|
return a;
|
|
44
30
|
}, {});
|
|
@@ -32,12 +32,17 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
32
32
|
}
|
|
33
33
|
}, class When extends abstractBase_js_1.BaseWhen {
|
|
34
34
|
async andWhen(store, whenCB, testResource, pm) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
return await fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
36
|
+
// try {
|
|
37
|
+
// return await fullTestInterface.andWhen(
|
|
38
|
+
// store,
|
|
39
|
+
// whenCB,
|
|
40
|
+
// testResource,
|
|
41
|
+
// pm
|
|
42
|
+
// );
|
|
43
|
+
// } catch (e) {
|
|
44
|
+
// console.log("mark22", e);
|
|
45
|
+
// }
|
|
41
46
|
}
|
|
42
47
|
}, class Then extends abstractBase_js_1.BaseThen {
|
|
43
48
|
async butThen(store, thenCB, testResource, pm) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultTestResourceRequirement = exports.DefaultTestInterface = exports.BaseTestInterface = void 0;
|
|
4
|
-
|
|
4
|
+
const BaseTestInterface = () => ({
|
|
5
5
|
beforeAll: async (s) => s,
|
|
6
6
|
beforeEach: async function (subject, initialValues, x, testResource, pm) {
|
|
7
7
|
return subject;
|
|
@@ -11,9 +11,18 @@ exports.BaseTestInterface = {
|
|
|
11
11
|
butThen: async (store, thenCb) => {
|
|
12
12
|
return thenCb(store);
|
|
13
13
|
},
|
|
14
|
-
andWhen: async (
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
andWhen: async (store, whenCB, testResource, pm) => {
|
|
15
|
+
try {
|
|
16
|
+
await whenCB(store, testResource, pm);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
console.error("Error in andWhen:", error);
|
|
20
|
+
throw error; // Re-throw to maintain test failure
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
assertThis: (x) => x,
|
|
24
|
+
});
|
|
25
|
+
exports.BaseTestInterface = BaseTestInterface;
|
|
17
26
|
const DefaultTestInterface = (p) => {
|
|
18
27
|
return Object.assign(Object.assign({}, exports.BaseTestInterface), p);
|
|
19
28
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const express_1 = __importDefault(require("express"));
|
|
7
|
+
const app = (0, express_1.default)();
|
|
8
|
+
app.get("/", (req, res) => {
|
|
9
|
+
res.send("Hello World!");
|
|
10
|
+
});
|
|
11
|
+
exports.default = (port) => {
|
|
12
|
+
app.listen(port, () => {
|
|
13
|
+
console.log(`Example app listening on port ${port}`);
|
|
14
|
+
});
|
|
15
|
+
return app;
|
|
16
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Node_1 = __importDefault(require("../Node"));
|
|
7
|
+
const index_1 = __importDefault(require("./index"));
|
|
8
|
+
const specification = (Suite, Given, When, Then) => {
|
|
9
|
+
console.log("Suite", Suite);
|
|
10
|
+
return [
|
|
11
|
+
Suite.TheMothership("the mothership allows the coordination of test resources", {
|
|
12
|
+
test0: Given.ItIsRunning([`a resource can be claimed`], [When.IClaimTheResource("test")], [
|
|
13
|
+
// Then.TheResourceIsClaimed("test")
|
|
14
|
+
]),
|
|
15
|
+
}, []),
|
|
16
|
+
];
|
|
17
|
+
};
|
|
18
|
+
const implementation = {
|
|
19
|
+
suites: { TheMothership: (x) => x },
|
|
20
|
+
givens: { ItIsRunning: () => undefined },
|
|
21
|
+
whens: {
|
|
22
|
+
IClaimTheResource: (resource) => async (i, tr, p) => {
|
|
23
|
+
fetch(`http://localhost:${tr.ports[0]}/claim?${resource}`);
|
|
24
|
+
},
|
|
25
|
+
IReleaseTheResource: function (resource) {
|
|
26
|
+
throw new Error("Function not implemented.");
|
|
27
|
+
},
|
|
28
|
+
IResetTheResource: function (Iw_0) {
|
|
29
|
+
throw new Error("Function not implemented.");
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
thens: {
|
|
33
|
+
TheResourceIsClaimed: (resource) => async (z, u) => {
|
|
34
|
+
throw new Error("Function not implemented.");
|
|
35
|
+
},
|
|
36
|
+
TheResourceIsUnClaimed: function (It_0) {
|
|
37
|
+
throw new Error("Function not implemented.");
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
checks: { AnEmptyState: () => "any" },
|
|
41
|
+
};
|
|
42
|
+
const testInterface = {
|
|
43
|
+
// assertThis: function (x: any) {
|
|
44
|
+
// throw new Error("Function not implemented.");
|
|
45
|
+
// },
|
|
46
|
+
// andWhen: function (store: any, whenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
47
|
+
// throw new Error("Function not implemented.");
|
|
48
|
+
// },
|
|
49
|
+
// butThen: function (store: any, thenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
50
|
+
// throw new Error("Function not implemented.");
|
|
51
|
+
// },
|
|
52
|
+
// afterAll: function (store: any, pm: IPM) {
|
|
53
|
+
// throw new Error("Function not implemented.");
|
|
54
|
+
// },
|
|
55
|
+
// afterEach: function (store: any, key: string, pm: IPM): Promise<unknown> {
|
|
56
|
+
// throw new Error("Function not implemented.");
|
|
57
|
+
// },
|
|
58
|
+
// beforeAll: function (input: Express, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
59
|
+
// throw new Error("Function not implemented.");
|
|
60
|
+
// },
|
|
61
|
+
beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
|
|
62
|
+
return subject(testResource.ports[0]);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
exports.default = (0, Node_1.default)(index_1.default, specification, implementation, testInterface);
|