testeranto 0.129.0 → 0.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aider.chat.history.md +137197 -0
- package/.aider.input.history +334 -0
- package/.aider.tags.cache.v3/18/8b/7dfca822129dad10b5cacadf7728.val +0 -0
- package/.aider.tags.cache.v3/{ec/c0/161c249c35be853cc40cf11f9267.val → 62/f5/8af72140d93c58db2f6aa5bf3f1f.val} +0 -0
- package/.aider.tags.cache.v3/8d/fa/12860238755bcfab9af8a93c52ab.val +0 -0
- package/.aider.tags.cache.v3/{b7/e6/5be87b62aeaf2bc244ff41c1b61a.val → a7/97/6d37fce350ad2d588f36729db0cd.val} +0 -0
- package/.aider.tags.cache.v3/{e3/e6/3501625caf5d5eb171f0d248462e.val → ad/3c/10f2ab1397f6d544e613d2a6acaf.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- package/.aider.tags.cache.v3/dd/5b/0ade824b0841c7c11e9352c5d2ca.val +0 -0
- package/README.md +333 -34
- package/bundle.js +8 -75
- package/dist/common/src/Init.js +6 -1
- package/dist/common/src/Node.js +6 -4
- package/dist/common/src/NodeSidecar.js +15 -0
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +187 -0
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +109 -0
- package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +94 -0
- package/dist/common/src/PM/base.js +33 -16
- package/dist/common/src/PM/main.js +484 -425
- package/dist/common/src/PM/node.js +44 -19
- package/dist/common/src/PM/nodeSidecar.js +65 -0
- package/dist/common/src/PM/pure.js +55 -47
- package/dist/common/src/PM/pureSidecar.js +48 -0
- package/dist/common/src/PM/sidecar.js +11 -0
- package/dist/common/src/PM/web.js +24 -6
- package/dist/common/src/PM/webSidecar.js +47 -0
- package/dist/common/src/PureSidecar.js +13 -0
- package/dist/common/src/SP__Polygon.test.js +10 -0
- package/dist/common/src/WebSidecar.js +14 -0
- package/dist/common/src/build.js +63 -10
- package/dist/common/src/defaultConfig.js +1 -0
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +27 -0
- package/dist/common/src/esbuildConfigs/pure.js +15 -1
- package/dist/common/src/esbuildConfigs/web.js +10 -1
- package/dist/common/src/{SubPackages/react-dom/jsx/index.js → lib/Sidecar.js} +4 -0
- package/dist/common/src/lib/abstractBase.js +7 -5
- package/dist/common/src/lib/basebuilder.js +1 -3
- package/dist/common/src/lib/classBuilder.js +4 -17
- package/dist/common/src/lib/core.js +11 -6
- package/dist/common/src/lib/index.js +13 -4
- package/dist/common/src/lib/pmProxy.js +1 -1
- package/dist/common/src/mothership/index.js +16 -0
- package/dist/common/src/mothership/test.js +65 -0
- package/dist/common/src/utils/queue.js +36 -0
- package/dist/common/src/utils.js +34 -5
- package/dist/common/testeranto.config.js +77 -39
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +6 -1
- package/dist/module/src/Node.js +6 -4
- package/dist/module/src/NodeSidecar.js +11 -0
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +180 -0
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +104 -0
- package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +89 -0
- package/dist/module/src/PM/base.js +33 -16
- package/dist/module/src/PM/main.js +485 -426
- package/dist/module/src/PM/node.js +44 -19
- package/dist/module/src/PM/nodeSidecar.js +58 -0
- package/dist/module/src/PM/pure.js +55 -44
- package/dist/module/src/PM/pureSidecar.js +41 -0
- package/dist/module/src/PM/sidecar.js +7 -0
- package/dist/module/src/PM/web.js +24 -6
- package/dist/module/src/PM/webSidecar.js +40 -0
- package/dist/module/src/Project.js +154 -75
- package/dist/module/src/PureSidecar.js +9 -0
- package/dist/module/src/ReportClient.js +132 -97
- package/dist/module/src/SP__Polygon.test.js +8 -0
- package/dist/module/src/TestReport.js +32 -14
- package/dist/module/src/WebSidecar.js +10 -0
- package/dist/module/src/build.js +63 -10
- package/dist/module/src/defaultConfig.js +1 -0
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +24 -0
- package/dist/module/src/esbuildConfigs/pure.js +15 -1
- package/dist/module/src/esbuildConfigs/web.js +10 -1
- package/dist/module/src/lib/Sidecar.js +2 -0
- package/dist/module/src/lib/abstractBase.js +7 -5
- package/dist/module/src/lib/basebuilder.js +1 -3
- package/dist/module/src/lib/classBuilder.js +4 -17
- package/dist/module/src/lib/core.js +11 -6
- package/dist/module/src/lib/index.js +12 -4
- package/dist/module/src/lib/pmProxy.js +1 -1
- package/dist/module/src/mothership/index.js +11 -0
- package/dist/module/src/mothership/test.js +60 -0
- package/dist/module/src/utils/queue.js +32 -0
- package/dist/module/src/utils.js +34 -5
- package/dist/module/testeranto.config.js +77 -36
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +3288 -385
- package/dist/prebuild/ReportClient.js +0 -24638
- package/dist/prebuild/TestReport.js +14 -8
- package/dist/prebuild/build.mjs +159 -15
- package/dist/prebuild/init-docs.mjs +2 -5
- package/dist/prebuild/mothership/index.mjs +17 -0
- package/dist/prebuild/run.mjs +693 -412
- package/dist/types/src/NodeSidecar.d.ts +6 -0
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +23 -0
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +20 -0
- package/dist/types/src/PM/base.d.ts +6 -5
- package/dist/types/src/PM/index.d.ts +5 -3
- package/dist/types/src/PM/main.d.ts +23 -26
- package/dist/types/src/PM/node.d.ts +8 -6
- package/dist/types/src/PM/nodeSidecar.d.ts +13 -0
- package/dist/types/src/PM/pure.d.ts +4 -3
- package/dist/types/src/PM/pureSidecar.d.ts +11 -0
- package/dist/types/src/PM/sidecar.d.ts +8 -0
- package/dist/types/src/PM/web.d.ts +18 -8
- package/dist/types/src/PM/webSidecar.d.ts +11 -0
- package/dist/types/src/PureSidecar.d.ts +8 -0
- package/dist/types/src/Types.d.ts +109 -43
- package/dist/types/src/WebSidecar.d.ts +8 -0
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +2 -0
- package/dist/types/src/lib/Sidecar.d.ts +5 -0
- package/dist/types/src/lib/abstractBase.d.ts +6 -6
- package/dist/types/src/lib/classBuilder.d.ts +7 -1
- package/dist/types/src/lib/core.d.ts +7 -1
- package/dist/types/src/lib/index.d.ts +10 -4
- package/dist/types/src/lib/types.d.ts +12 -2
- package/dist/types/src/mothership/index.d.ts +2 -0
- package/dist/types/src/mothership/test.d.ts +21 -0
- package/dist/types/src/utils/queue.d.ts +11 -0
- package/dist/types/src/utils.d.ts +4 -7
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +19 -105
- package/src/Init.ts +6 -5
- package/src/Node.ts +7 -4
- package/src/NodeSidecar.ts +22 -0
- package/src/PM/PM_WithEslintAndTsc.ts +284 -0
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +173 -0
- package/src/PM/__tests__/pureSidecar.testeranto.ts +157 -0
- package/src/PM/__tests__/webSidecar.testeranto.ts +157 -0
- package/src/PM/base.ts +38 -17
- package/src/PM/index.ts +9 -3
- package/src/PM/main.ts +608 -582
- package/src/PM/node.ts +67 -23
- package/src/PM/nodeSidecar.ts +73 -0
- package/src/PM/pure.ts +68 -58
- package/src/PM/pureSidecar.ts +56 -0
- package/src/PM/sidecar.ts +48 -0
- package/src/PM/web.ts +42 -11
- package/src/PM/webSidecar.ts +55 -0
- package/src/Project.tsx +312 -109
- package/src/Pure.ts +0 -2
- package/src/PureSidecar.ts +14 -0
- package/src/ReportClient.tsx +164 -170
- package/src/SP__Polygon.test.ts +13 -0
- package/src/TestReport.tsx +77 -6
- package/src/Types.ts +227 -122
- package/src/WebSidecar.ts +14 -0
- package/src/build.ts +101 -14
- package/src/defaultConfig.ts +1 -0
- package/src/esbuildConfigs/README.md +46 -0
- package/src/esbuildConfigs/consoleDetectorPlugin.ts +29 -0
- package/src/esbuildConfigs/pure.ts +22 -1
- package/src/esbuildConfigs/web.ts +13 -0
- package/src/lib/Sidecar.ts +6 -0
- package/src/lib/TEST_ADAPTER_RENAME.md +48 -0
- package/src/lib/abstractBase.ts +12 -9
- package/src/lib/basebuilder.ts +5 -4
- package/src/lib/classBuilder.ts +15 -18
- package/src/lib/core.ts +24 -11
- package/src/lib/index.ts +38 -18
- package/src/lib/pmProxy.ts +3 -1
- package/src/lib/types.ts +15 -2
- package/src/mothership/index.ts +15 -0
- package/src/mothership/test.ts +137 -0
- package/src/run.ts +0 -1
- package/src/utils/queue.ts +41 -0
- package/src/utils.ts +41 -15
- package/testeranto/bundles/node/mothership/chunk-PG6KUKNP.mjs +44 -0
- package/testeranto/bundles/node/mothership/chunk-V2EQEXU2.mjs +1032 -0
- package/testeranto/bundles/node/mothership/metafile.json +389 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +1219 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/pureSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +1199 -0
- package/testeranto/bundles/node/mothership/src/PM/__tests__/webSidecar.testeranto.mjs +156 -0
- package/testeranto/bundles/node/mothership/src/mothership/test.mjs +24411 -0
- package/testeranto/bundles/pure/mothership/metafile.json +8 -0
- package/testeranto/bundles/web/mothership/metafile.json +8 -0
- package/testeranto/index.html +4 -4
- package/testeranto/reports/mothership/config.json +25 -0
- package/testeranto/reports/{redux → mothership}/index.html +8 -8
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +35 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +1564 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +22 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +56 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +29 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html +20 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +26 -0
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +4 -0
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +20 -0
- package/testeranto/reports/mothership/src/mothership/test/node/lint_errors.json +1 -0
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +12 -0
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +24 -0
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +18 -0
- package/testeranto/reports/mothership/summary.json +9 -0
- package/testeranto.config.ts +82 -44
- package/tsc.log +78 -81
- package/dist/common/src/SubPackages/react/component/index.js +0 -20
- package/dist/common/src/SubPackages/react/component/node.js +0 -10
- package/dist/common/src/SubPackages/react/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react/component/web.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/index.js +0 -64
- package/dist/common/src/SubPackages/react/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/dynamic.js +0 -61
- package/dist/common/src/SubPackages/react-dom/component/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/component/static.js +0 -26
- package/dist/common/src/SubPackages/react-dom/component/web.js +0 -16
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +0 -31
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +0 -59
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +0 -16
- package/dist/common/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +0 -15
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +0 -70
- package/dist/common/src/SubPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -57
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/component/web.js +0 -8
- package/dist/common/src/SubPackages/react-test-renderer/fc/node.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/fc/web.js +0 -60
- package/dist/common/src/SubPackages/react-test-renderer/jsx/index.js +0 -67
- package/dist/common/src/SubPackages/react-test-renderer/jsx/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx/web.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
- package/dist/common/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
- package/dist/common/src/examples/react/component/index.js +0 -33
- package/dist/common/src/examples/react/component/test.js +0 -36
- package/dist/module/src/SubPackages/react/component/index.js +0 -13
- package/dist/module/src/SubPackages/react/component/node.js +0 -5
- package/dist/module/src/SubPackages/react/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react/component/web.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/index.js +0 -58
- package/dist/module/src/SubPackages/react/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/dynamic.js +0 -54
- package/dist/module/src/SubPackages/react-dom/component/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/component/static.js +0 -22
- package/dist/module/src/SubPackages/react-dom/component/web.js +0 -11
- package/dist/module/src/SubPackages/react-dom/jsx/dynamic.js +0 -27
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +0 -53
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +0 -11
- package/dist/module/src/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +0 -14
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +0 -31
- package/dist/module/src/SubPackages/react-test-renderer/component/node.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +0 -54
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/component/web.js +0 -3
- package/dist/module/src/SubPackages/react-test-renderer/fc/node.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/fc/web.js +0 -22
- package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +0 -28
- package/dist/module/src/SubPackages/react-test-renderer/jsx/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/module/src/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
- package/dist/module/src/examples/react/component/index.js +0 -26
- package/dist/module/src/examples/react/component/test.js +0 -32
- package/dist/prebuild/ReportClient.css +0 -11342
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/src/SubPackages/react/component/index.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +0 -20
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +0 -9
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -6
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +0 -5
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -11
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/src/examples/react/component/index.d.ts +0 -13
- package/dist/types/src/examples/react/component/test.d.ts +0 -17
- package/src/SubPackages/react/component/index.ts +0 -28
- package/src/SubPackages/react/component/node.ts +0 -17
- package/src/SubPackages/react/component/pure.ts +0 -17
- package/src/SubPackages/react/component/web.ts +0 -17
- package/src/SubPackages/react/jsx/index.ts +0 -75
- package/src/SubPackages/react/jsx/node.ts +0 -23
- package/src/SubPackages/react/jsx/pure.ts +0 -23
- package/src/SubPackages/react/jsx/web.ts +0 -24
- package/src/SubPackages/react-dom/component/dynamic.ts +0 -107
- package/src/SubPackages/react-dom/component/node.ts +0 -17
- package/src/SubPackages/react-dom/component/pure.ts +0 -17
- package/src/SubPackages/react-dom/component/static.ts +0 -41
- package/src/SubPackages/react-dom/component/web.ts +0 -32
- package/src/SubPackages/react-dom/jsx/dynamic.ts +0 -46
- package/src/SubPackages/react-dom/jsx/index.ts +0 -6
- package/src/SubPackages/react-dom/jsx/node.ts +0 -18
- package/src/SubPackages/react-dom/jsx/pure.ts +0 -18
- package/src/SubPackages/react-dom/jsx/static.ts +0 -87
- package/src/SubPackages/react-dom/jsx/web.ts +0 -26
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +0 -54
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -32
- package/src/SubPackages/react-test-renderer/component/interface.ts +0 -43
- package/src/SubPackages/react-test-renderer/component/node.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/pure.ts +0 -18
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +0 -63
- package/src/SubPackages/react-test-renderer/component/test/node.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/test/web.ts +0 -14
- package/src/SubPackages/react-test-renderer/component/web.ts +0 -18
- package/src/SubPackages/react-test-renderer/fc/node.ts +0 -83
- package/src/SubPackages/react-test-renderer/fc/web.ts +0 -80
- package/src/SubPackages/react-test-renderer/jsx/index.ts +0 -61
- package/src/SubPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +0 -31
- package/src/SubPackages/react-test-renderer/jsx/web.ts +0 -32
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +0 -73
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +0 -36
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +0 -36
- package/src/examples/react/component/index.tsx +0 -35
- package/src/examples/react/component/test.ts +0 -83
- package/testeranto/bundles/node/redux/metafile.json +0 -559
- package/testeranto/bundles/pure/redux/metafile.json +0 -554
- package/testeranto/bundles/web/redux/metafile.json +0 -504
- package/testeranto/bundles/web/redux/test/web.html +0 -19
- package/testeranto/reports/redux/config.json +0 -38
- package/testeranto/reports/redux/summary.json +0 -20
- /package/dist/{module/src/SubPackages/react-dom/jsx/index.js → types/src/SP__Polygon.test.d.ts} +0 -0
package/dist/module/src/build.js
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 from "fs";
|
|
3
5
|
import path from "path";
|
|
@@ -11,7 +13,7 @@ import { getRunnables } from "./utils.js";
|
|
|
11
13
|
readline.emitKeypressEvents(process.stdin);
|
|
12
14
|
if (process.stdin.isTTY)
|
|
13
15
|
process.stdin.setRawMode(true);
|
|
14
|
-
|
|
16
|
+
const testName = process.argv[2];
|
|
15
17
|
let mode = process.argv[3];
|
|
16
18
|
if (mode !== "once" && mode !== "dev") {
|
|
17
19
|
console.error(`The 4th argument should be 'dev' or 'once', not '${mode}'.`);
|
|
@@ -41,6 +43,19 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
41
43
|
};
|
|
42
44
|
return Array.from(meta(config.tests, new Set()));
|
|
43
45
|
};
|
|
46
|
+
const getSideCars = (runtime) => {
|
|
47
|
+
return Array.from(new Set(config.tests
|
|
48
|
+
.reduce((mm, t) => {
|
|
49
|
+
mm = mm.concat(t[3]);
|
|
50
|
+
return mm;
|
|
51
|
+
}, [])
|
|
52
|
+
.filter((t) => {
|
|
53
|
+
return t[1] === runtime;
|
|
54
|
+
})
|
|
55
|
+
.map((t) => {
|
|
56
|
+
return t[0];
|
|
57
|
+
})));
|
|
58
|
+
};
|
|
44
59
|
const config = Object.assign(Object.assign({}, rawConfig), { buildDir: process.cwd() + "/testeranto/bundles/" + testName });
|
|
45
60
|
console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
|
|
46
61
|
process.stdin.on("keypress", (str, key) => {
|
|
@@ -61,7 +76,11 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
61
76
|
let webDone = false;
|
|
62
77
|
let importDone = false;
|
|
63
78
|
let status = "build";
|
|
64
|
-
const { nodeEntryPoints, webEntryPoints,
|
|
79
|
+
const { nodeEntryPoints, nodeEntryPointSidecars, webEntryPoints, webEntryPointSidecars, pureEntryPoints, pureEntryPointSidecars, } = getRunnables(config.tests, testName);
|
|
80
|
+
// const { nodeEntryPointsSidecars, webEntryPointsSidecars, importEntryPointsSideCars } = getRunnableSidecars(
|
|
81
|
+
// config.tests,
|
|
82
|
+
// testName
|
|
83
|
+
// );
|
|
65
84
|
const onNodeDone = () => {
|
|
66
85
|
nodeDone = true;
|
|
67
86
|
onDone();
|
|
@@ -83,6 +102,7 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
83
102
|
process.exit();
|
|
84
103
|
}
|
|
85
104
|
};
|
|
105
|
+
console.log(`testeranto/reports/${testName}`);
|
|
86
106
|
if (!fs.existsSync(`testeranto/reports/${testName}`)) {
|
|
87
107
|
fs.mkdirSync(`testeranto/reports/${testName}`);
|
|
88
108
|
}
|
|
@@ -161,11 +181,24 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
161
181
|
// });
|
|
162
182
|
// });
|
|
163
183
|
const x = [
|
|
164
|
-
["pure", Object.keys(
|
|
184
|
+
["pure", Object.keys(pureEntryPoints)],
|
|
165
185
|
["node", Object.keys(nodeEntryPoints)],
|
|
166
186
|
["web", Object.keys(webEntryPoints)],
|
|
187
|
+
// [
|
|
188
|
+
// "pure",
|
|
189
|
+
// [...Object.keys(pureEntryPoints), ...Object.keys(pureEntryPointSidecars)],
|
|
190
|
+
// ],
|
|
191
|
+
// [
|
|
192
|
+
// "node",
|
|
193
|
+
// [...Object.keys(nodeEntryPoints), ...Object.keys(nodeEntryPointSidecars)],
|
|
194
|
+
// ],
|
|
195
|
+
// [
|
|
196
|
+
// "web",
|
|
197
|
+
// [...Object.keys(webEntryPoints), ...Object.keys(webEntryPointSidecars)],
|
|
198
|
+
// ],
|
|
167
199
|
];
|
|
168
200
|
x.forEach(async ([runtime, keys]) => {
|
|
201
|
+
console.log(runtime, keys);
|
|
169
202
|
keys.forEach(async (k) => {
|
|
170
203
|
const folder = `testeranto/reports/${testName}/${k
|
|
171
204
|
.split(".")
|
|
@@ -183,8 +216,8 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
183
216
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
184
217
|
<meta name="author" content="" />
|
|
185
218
|
|
|
186
|
-
<link rel="stylesheet" href="
|
|
187
|
-
<script src="
|
|
219
|
+
<link rel="stylesheet" href="../../../../../../TestReport.css" />
|
|
220
|
+
<script src="../../../../../../TestReport.js"></script>
|
|
188
221
|
|
|
189
222
|
</head>
|
|
190
223
|
|
|
@@ -194,14 +227,34 @@ import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
|
194
227
|
`);
|
|
195
228
|
});
|
|
196
229
|
});
|
|
230
|
+
[
|
|
231
|
+
[pureEntryPoints, pureEntryPointSidecars, "pure"],
|
|
232
|
+
[webEntryPoints, webEntryPointSidecars, "web"],
|
|
233
|
+
[nodeEntryPoints, nodeEntryPointSidecars, "node"],
|
|
234
|
+
].forEach(([eps, eps2, runtime]) => {
|
|
235
|
+
[...Object.keys(eps), ...Object.keys(eps2)].forEach((ep) => {
|
|
236
|
+
const fp = path.resolve(`testeranto`, `reports`, testName, ep.split(".").slice(0, -1).join("."), runtime);
|
|
237
|
+
fs.mkdirSync(fp, { recursive: true });
|
|
238
|
+
});
|
|
239
|
+
});
|
|
197
240
|
await Promise.all([
|
|
198
241
|
...[
|
|
199
|
-
[
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
242
|
+
[
|
|
243
|
+
esbuildImportConfiger,
|
|
244
|
+
pureEntryPoints,
|
|
245
|
+
pureEntryPointSidecars,
|
|
246
|
+
onImportDone,
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
esbuildNodeConfiger,
|
|
250
|
+
nodeEntryPoints,
|
|
251
|
+
nodeEntryPointSidecars,
|
|
252
|
+
onNodeDone,
|
|
253
|
+
],
|
|
254
|
+
[esbuildWebConfiger, webEntryPoints, webEntryPointSidecars, onWebDone],
|
|
255
|
+
].map(([configer, entryPoints, sidecars, done]) => {
|
|
203
256
|
esbuild
|
|
204
|
-
.context(configer(config, Object.keys(entryPoints), testName))
|
|
257
|
+
.context(configer(config, [...Object.keys(entryPoints), ...Object.keys(sidecars)], testName))
|
|
205
258
|
.then(async (ctx) => {
|
|
206
259
|
if (mode === "dev") {
|
|
207
260
|
await ctx.watch().then((v) => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const consoleDetectorPlugin = {
|
|
2
|
+
name: 'console-detector',
|
|
3
|
+
setup(build) {
|
|
4
|
+
build.onLoad({ filter: /\.(js|ts)$/ }, async (args) => {
|
|
5
|
+
const contents = await require('fs').promises.readFile(args.path, 'utf8');
|
|
6
|
+
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;
|
|
7
|
+
const matches = contents.match(consolePattern);
|
|
8
|
+
if (matches) {
|
|
9
|
+
const uniqueMethods = [...new Set(matches)];
|
|
10
|
+
return {
|
|
11
|
+
warnings: uniqueMethods.map(method => ({
|
|
12
|
+
text: `Detected ${method} call - Pure runtime does not allow IO operations. Use Node runtime instead.`,
|
|
13
|
+
location: {
|
|
14
|
+
file: args.path,
|
|
15
|
+
line: contents.split('\n').findIndex(line => line.includes(method)) + 1,
|
|
16
|
+
column: 0
|
|
17
|
+
}
|
|
18
|
+
}))
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import baseEsBuildConfig from "./index.js";
|
|
2
2
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
3
3
|
import featuresPlugin from "./featuresPlugin.js";
|
|
4
|
+
import { isBuiltin } from "node:module";
|
|
5
|
+
import { consoleDetectorPlugin } from "./consoleDetectorPlugin.js";
|
|
4
6
|
export default (config, entryPoints, testName) => {
|
|
5
7
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("pure", testName);
|
|
6
|
-
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { drop: [
|
|
8
|
+
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { drop: [], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
7
9
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
8
10
|
metafile: true, supported: {
|
|
9
11
|
"dynamic-import": true,
|
|
@@ -14,6 +16,18 @@ export default (config, entryPoints, testName) => {
|
|
|
14
16
|
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
15
17
|
featuresPlugin,
|
|
16
18
|
inputFilesPluginFactory,
|
|
19
|
+
consoleDetectorPlugin,
|
|
20
|
+
{
|
|
21
|
+
name: "native-node-import-filter",
|
|
22
|
+
setup(build) {
|
|
23
|
+
build.onResolve({ filter: /fs/ }, (args) => {
|
|
24
|
+
if (isBuiltin(args.path)) {
|
|
25
|
+
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"`);
|
|
26
|
+
}
|
|
27
|
+
return { path: args.path };
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
},
|
|
17
31
|
{
|
|
18
32
|
name: "rebuild-notify",
|
|
19
33
|
setup: (build) => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { polyfillNode } from "esbuild-plugin-polyfill-node";
|
|
1
2
|
import path from "path";
|
|
2
3
|
import baseEsBuildConfig from "./index.js";
|
|
3
4
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
4
5
|
import featuresPlugin from "./featuresPlugin.js";
|
|
5
6
|
export default (config, entryPoints, testName) => {
|
|
6
7
|
const { inputFilesPluginFactory, register } = inputFilesPlugin("web", testName);
|
|
7
|
-
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
8
|
+
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { treeShaking: true, outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
8
9
|
react: path.resolve("./node_modules/react"),
|
|
9
10
|
}, metafile: true, external: [
|
|
10
11
|
"path",
|
|
@@ -27,6 +28,14 @@ export default (config, entryPoints, testName) => {
|
|
|
27
28
|
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
28
29
|
featuresPlugin,
|
|
29
30
|
inputFilesPluginFactory,
|
|
31
|
+
polyfillNode({
|
|
32
|
+
// You might need to configure specific Node.js modules you want to polyfill
|
|
33
|
+
// Example:
|
|
34
|
+
// modules: {
|
|
35
|
+
// 'util': true,
|
|
36
|
+
// 'fs': false,
|
|
37
|
+
// }
|
|
38
|
+
}),
|
|
30
39
|
{
|
|
31
40
|
name: "rebuild-notify",
|
|
32
41
|
setup: (build) => {
|
|
@@ -54,7 +54,7 @@ export class BaseSuite {
|
|
|
54
54
|
catch (e) {
|
|
55
55
|
this.failed = true;
|
|
56
56
|
this.fails = this.fails + 1;
|
|
57
|
-
|
|
57
|
+
console.error(e);
|
|
58
58
|
// this.fails.push(giver);
|
|
59
59
|
// return this;
|
|
60
60
|
}
|
|
@@ -136,7 +136,7 @@ export class BaseGiven {
|
|
|
136
136
|
}
|
|
137
137
|
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
138
138
|
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
|
|
139
|
-
|
|
139
|
+
tester(t);
|
|
140
140
|
// ((t) => {
|
|
141
141
|
// return tester(t);
|
|
142
142
|
// })();
|
|
@@ -167,16 +167,18 @@ export class BaseWhen {
|
|
|
167
167
|
this.whenCB = whenCB;
|
|
168
168
|
}
|
|
169
169
|
toObj() {
|
|
170
|
+
console.log("toObj error", this.error);
|
|
170
171
|
return {
|
|
171
172
|
name: this.name,
|
|
172
|
-
error: this.error,
|
|
173
|
+
error: this.error && this.error.name + this.error.stack,
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
176
177
|
tLog(" When:", this.name);
|
|
177
178
|
return await this.andWhen(store, this.whenCB, testResourceConfiguration, andWhenProxy(pm, filepath)).catch((e) => {
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
console.log("MARK9", e);
|
|
180
|
+
this.error = e;
|
|
181
|
+
throw e;
|
|
180
182
|
});
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -25,15 +25,13 @@ export class BaseBuilder {
|
|
|
25
25
|
},
|
|
26
26
|
runner,
|
|
27
27
|
receiveTestResourceConfig: async function (puppetMaster) {
|
|
28
|
-
const start = await puppetMaster.start();
|
|
29
28
|
const logFilePath = "log.txt";
|
|
30
29
|
const access = await puppetMaster.createWriteStream(logFilePath);
|
|
31
30
|
const tLog = async (...l) => {
|
|
32
|
-
const x = await puppetMaster.write(access, `${l.toString()}\n`);
|
|
33
31
|
// console.log("x", x);
|
|
34
32
|
};
|
|
35
33
|
const suiteDone = await runner(puppetMaster, tLog);
|
|
36
|
-
const logPromise = new Promise(async (res
|
|
34
|
+
const logPromise = new Promise(async (res) => {
|
|
37
35
|
await puppetMaster.end(access);
|
|
38
36
|
res(true);
|
|
39
37
|
});
|
|
@@ -8,11 +8,9 @@ export class ClassBuilder extends BaseBuilder {
|
|
|
8
8
|
return a;
|
|
9
9
|
}, {});
|
|
10
10
|
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
11
|
-
a[key] = (features, whens, thens) => {
|
|
11
|
+
a[key] = (features, whens, thens, ...initialValues) => {
|
|
12
12
|
// console.log("givEn", givEn.toString());
|
|
13
|
-
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key]
|
|
14
|
-
// givEn
|
|
15
|
-
);
|
|
13
|
+
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key], initialValues);
|
|
16
14
|
};
|
|
17
15
|
return a;
|
|
18
16
|
}, {});
|
|
@@ -23,19 +21,8 @@ export class ClassBuilder extends BaseBuilder {
|
|
|
23
21
|
return a;
|
|
24
22
|
}, {});
|
|
25
23
|
const classyThens = Object.entries(testImplementation.thens).reduce((a, [key, thEn]) => {
|
|
26
|
-
a[key] = (expected, x) => {
|
|
27
|
-
return new thenKlasser.prototype.constructor(`${thEn.name}: ${expected && expected.toString()}`,
|
|
28
|
-
// () => {
|
|
29
|
-
// thEn(expected);
|
|
30
|
-
// // return new Promise((res), rej) => {
|
|
31
|
-
// // }
|
|
32
|
-
// // try {
|
|
33
|
-
// // thEn(expected);
|
|
34
|
-
// // } catch (c) {
|
|
35
|
-
// // console.log("mark99");
|
|
36
|
-
// // }
|
|
37
|
-
// },
|
|
38
|
-
thEn(expected));
|
|
24
|
+
a[key] = (expected, ...x) => {
|
|
25
|
+
return new thenKlasser.prototype.constructor(`${thEn.name}: ${expected && expected.toString()}`, thEn(expected, ...x));
|
|
39
26
|
};
|
|
40
27
|
return a;
|
|
41
28
|
}, {});
|
|
@@ -30,12 +30,17 @@ export default class Testeranto extends ClassBuilder {
|
|
|
30
30
|
}
|
|
31
31
|
}, class When extends BaseWhen {
|
|
32
32
|
async andWhen(store, whenCB, testResource, pm) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
return await fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
34
|
+
// try {
|
|
35
|
+
// return await fullTestInterface.andWhen(
|
|
36
|
+
// store,
|
|
37
|
+
// whenCB,
|
|
38
|
+
// testResource,
|
|
39
|
+
// pm
|
|
40
|
+
// );
|
|
41
|
+
// } catch (e) {
|
|
42
|
+
// console.log("mark22", e);
|
|
43
|
+
// }
|
|
39
44
|
}
|
|
40
45
|
}, class Then extends BaseThen {
|
|
41
46
|
async butThen(store, thenCB, testResource, pm) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const BaseTestInterface = {
|
|
1
|
+
export const BaseTestInterface = () => ({
|
|
2
2
|
beforeAll: async (s) => s,
|
|
3
3
|
beforeEach: async function (subject, initialValues, x, testResource, pm) {
|
|
4
4
|
return subject;
|
|
@@ -8,9 +8,17 @@ export const BaseTestInterface = {
|
|
|
8
8
|
butThen: async (store, thenCb) => {
|
|
9
9
|
return thenCb(store);
|
|
10
10
|
},
|
|
11
|
-
andWhen: async (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
andWhen: async (store, whenCB, testResource, pm) => {
|
|
12
|
+
try {
|
|
13
|
+
await whenCB(store, testResource, pm);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
console.error("Error in andWhen:", error);
|
|
17
|
+
throw error; // Re-throw to maintain test failure
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
assertThis: (x) => x,
|
|
21
|
+
});
|
|
14
22
|
export const DefaultTestInterface = (p) => {
|
|
15
23
|
return Object.assign(Object.assign({}, BaseTestInterface), p);
|
|
16
24
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
const app = express();
|
|
3
|
+
app.get("/", (req, res) => {
|
|
4
|
+
res.send("Hello World!");
|
|
5
|
+
});
|
|
6
|
+
export default (port) => {
|
|
7
|
+
app.listen(port, () => {
|
|
8
|
+
console.log(`Example app listening on port ${port}`);
|
|
9
|
+
});
|
|
10
|
+
return app;
|
|
11
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Testeranto from "../Node";
|
|
2
|
+
import appFactory from "./index";
|
|
3
|
+
const specification = (Suite, Given, When, Then) => {
|
|
4
|
+
console.log("Suite", Suite);
|
|
5
|
+
return [
|
|
6
|
+
Suite.TheMothership("the mothership allows the coordination of test resources", {
|
|
7
|
+
test0: Given.ItIsRunning([`a resource can be claimed`], [When.IClaimTheResource("test")], [
|
|
8
|
+
// Then.TheResourceIsClaimed("test")
|
|
9
|
+
]),
|
|
10
|
+
}, []),
|
|
11
|
+
];
|
|
12
|
+
};
|
|
13
|
+
const implementation = {
|
|
14
|
+
suites: { TheMothership: (x) => x },
|
|
15
|
+
givens: { ItIsRunning: () => undefined },
|
|
16
|
+
whens: {
|
|
17
|
+
IClaimTheResource: (resource) => async (i, tr, p) => {
|
|
18
|
+
fetch(`http://localhost:${tr.ports[0]}/claim?${resource}`);
|
|
19
|
+
},
|
|
20
|
+
IReleaseTheResource: function (resource) {
|
|
21
|
+
throw new Error("Function not implemented.");
|
|
22
|
+
},
|
|
23
|
+
IResetTheResource: function (Iw_0) {
|
|
24
|
+
throw new Error("Function not implemented.");
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
thens: {
|
|
28
|
+
TheResourceIsClaimed: (resource) => async (z, u) => {
|
|
29
|
+
throw new Error("Function not implemented.");
|
|
30
|
+
},
|
|
31
|
+
TheResourceIsUnClaimed: function (It_0) {
|
|
32
|
+
throw new Error("Function not implemented.");
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
checks: { AnEmptyState: () => "any" },
|
|
36
|
+
};
|
|
37
|
+
const testInterface = {
|
|
38
|
+
// assertThis: function (x: any) {
|
|
39
|
+
// throw new Error("Function not implemented.");
|
|
40
|
+
// },
|
|
41
|
+
// andWhen: function (store: any, whenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
42
|
+
// throw new Error("Function not implemented.");
|
|
43
|
+
// },
|
|
44
|
+
// butThen: function (store: any, thenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
45
|
+
// throw new Error("Function not implemented.");
|
|
46
|
+
// },
|
|
47
|
+
// afterAll: function (store: any, pm: IPM) {
|
|
48
|
+
// throw new Error("Function not implemented.");
|
|
49
|
+
// },
|
|
50
|
+
// afterEach: function (store: any, key: string, pm: IPM): Promise<unknown> {
|
|
51
|
+
// throw new Error("Function not implemented.");
|
|
52
|
+
// },
|
|
53
|
+
// beforeAll: function (input: Express, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
54
|
+
// throw new Error("Function not implemented.");
|
|
55
|
+
// },
|
|
56
|
+
beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
|
|
57
|
+
return subject(testResource.ports[0]);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
export default Testeranto(appFactory, specification, implementation, testInterface);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export class Queue {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.items = [];
|
|
4
|
+
}
|
|
5
|
+
enqueue(element) {
|
|
6
|
+
this.items.push(element);
|
|
7
|
+
}
|
|
8
|
+
dequeue() {
|
|
9
|
+
if (this.isEmpty()) {
|
|
10
|
+
return "Queue is empty";
|
|
11
|
+
}
|
|
12
|
+
return this.items.shift();
|
|
13
|
+
}
|
|
14
|
+
peek() {
|
|
15
|
+
if (this.isEmpty()) {
|
|
16
|
+
return "Queue is empty";
|
|
17
|
+
}
|
|
18
|
+
return this.items[0];
|
|
19
|
+
}
|
|
20
|
+
isEmpty() {
|
|
21
|
+
return this.items.length === 0;
|
|
22
|
+
}
|
|
23
|
+
size() {
|
|
24
|
+
return this.items.length;
|
|
25
|
+
}
|
|
26
|
+
clear() {
|
|
27
|
+
this.items = [];
|
|
28
|
+
}
|
|
29
|
+
print() {
|
|
30
|
+
console.log(this.items.join(" -> "));
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist/module/src/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import path from "path";
|
|
2
3
|
export const destinationOfRuntime = (f, r, configs) => {
|
|
3
4
|
return path
|
|
@@ -20,8 +21,11 @@ export const promptPather = (entryPoint, platform, projectName) => {
|
|
|
20
21
|
};
|
|
21
22
|
export const getRunnables = (tests, projectName, payload = {
|
|
22
23
|
nodeEntryPoints: {},
|
|
24
|
+
nodeEntryPointSidecars: {},
|
|
23
25
|
webEntryPoints: {},
|
|
24
|
-
|
|
26
|
+
webEntryPointSidecars: {},
|
|
27
|
+
pureEntryPoints: {},
|
|
28
|
+
pureEntryPointSidecars: {},
|
|
25
29
|
}) => {
|
|
26
30
|
return tests.reduce((pt, cv, cndx, cry) => {
|
|
27
31
|
if (cv[1] === "node") {
|
|
@@ -39,15 +43,40 @@ export const getRunnables = (tests, projectName, payload = {
|
|
|
39
43
|
.join(".")}`);
|
|
40
44
|
}
|
|
41
45
|
else if (cv[1] === "pure") {
|
|
42
|
-
pt.
|
|
46
|
+
pt.pureEntryPoints[cv[0]] = path.resolve(`./testeranto/bundles/pure/${projectName}/${cv[0]
|
|
43
47
|
.split(".")
|
|
44
48
|
.slice(0, -1)
|
|
45
49
|
.concat("mjs")
|
|
46
50
|
.join(".")}`);
|
|
47
51
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
//////////////////////////////////////////////////////////
|
|
53
|
+
cv[3]
|
|
54
|
+
.filter((t) => t[1] === "node")
|
|
55
|
+
.forEach((t) => {
|
|
56
|
+
pt.nodeEntryPointSidecars[`${t[0]}`] = path.resolve(`./testeranto/bundles/node/${projectName}/${cv[0]
|
|
57
|
+
.split(".")
|
|
58
|
+
.slice(0, -1)
|
|
59
|
+
.concat("mjs")
|
|
60
|
+
.join(".")}`);
|
|
61
|
+
});
|
|
62
|
+
cv[3]
|
|
63
|
+
.filter((t) => t[1] === "web")
|
|
64
|
+
.forEach((t) => {
|
|
65
|
+
pt.webEntryPointSidecars[`${t[0]}`] = path.resolve(`./testeranto/bundles/web/${projectName}/${cv[0]
|
|
66
|
+
.split(".")
|
|
67
|
+
.slice(0, -1)
|
|
68
|
+
.concat("mjs")
|
|
69
|
+
.join(".")}`);
|
|
70
|
+
});
|
|
71
|
+
cv[3]
|
|
72
|
+
.filter((t) => t[1] === "pure")
|
|
73
|
+
.forEach((t) => {
|
|
74
|
+
pt.pureEntryPointSidecars[`${t[0]}`] = path.resolve(`./testeranto/bundles/pure/${projectName}/${cv[0]
|
|
75
|
+
.split(".")
|
|
76
|
+
.slice(0, -1)
|
|
77
|
+
.concat("mjs")
|
|
78
|
+
.join(".")}`);
|
|
79
|
+
});
|
|
51
80
|
return pt;
|
|
52
81
|
}, payload);
|
|
53
82
|
};
|