testeranto 0.197.0 → 0.198.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/.vscode/settings.json +7 -2
- package/design-editor/DesignEditor.tsx +9 -5
- package/dist/common/design-editor/DesignEditor.js +8 -5
- package/dist/common/src/App.js +29 -5
- package/dist/common/src/Node.js +3 -2
- package/dist/common/src/PM/main.js +1 -1
- package/dist/common/src/Pure.js +2 -2
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/components/DesignEditorPage.js +55 -19
- package/dist/common/src/lib/BaseGiven.js +99 -0
- package/dist/common/src/lib/BaseSuite.test/mock.js +9 -5
- package/dist/common/src/lib/BaseThen.js +64 -0
- package/dist/common/src/lib/BaseWhen.js +45 -0
- package/dist/common/src/lib/Tiposkripto.js +149 -0
- package/dist/common/src/lib/{core.test/MockCore.js → Tiposkripto.test/MockTiposkripto.js} +5 -8
- package/dist/common/src/lib/{core.test/core.test.adapter.js → Tiposkripto.test/Tiposkripto.adapter.js} +10 -8
- package/dist/common/src/lib/{classBuilder.test/classBuilder.test.implementation.js → Tiposkripto.test/Tiposkripto.implementation.js} +44 -61
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.js +11 -0
- package/dist/common/src/lib/{classBuilder.test/classBuilder.test.specification.js → Tiposkripto.test/Tiposkripto.specification.js} +13 -9
- package/dist/common/src/lib/abstractBase.test/MockGiven.js +10 -3
- package/dist/common/src/lib/abstractBase.test/MockThen.js +6 -3
- package/dist/common/src/lib/abstractBase.test/MockWhen.js +10 -3
- package/dist/common/src/lib/abstractBase.test/adapter.js +18 -6
- package/dist/common/src/lib/abstractBase.test/implementation.js +3 -3
- package/dist/common/src/lib/mocks.test.js +10 -8
- package/dist/common/src/run.js +15 -4
- package/dist/common/testeranto.config.js +12 -36
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/design-editor/DesignEditor.js +8 -5
- package/dist/module/src/App.js +29 -5
- package/dist/module/src/Node.js +3 -2
- package/dist/module/src/PM/main.js +1 -1
- package/dist/module/src/Pure.js +2 -2
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/components/DesignEditorPage.js +55 -19
- package/dist/module/src/lib/BaseGiven.js +95 -0
- package/dist/module/src/lib/BaseSuite.test/mock.js +6 -2
- package/dist/module/src/lib/BaseThen.js +60 -0
- package/dist/module/src/lib/BaseWhen.js +41 -0
- package/dist/module/src/lib/Tiposkripto.js +146 -0
- package/dist/module/src/lib/{core.test/MockCore.js → Tiposkripto.test/MockTiposkripto.js} +3 -6
- package/dist/module/src/lib/{core.test/core.test.adapter.js → Tiposkripto.test/Tiposkripto.adapter.js} +10 -8
- package/dist/module/src/lib/{classBuilder.test/classBuilder.test.implementation.js → Tiposkripto.test/Tiposkripto.implementation.js} +44 -58
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.js +6 -0
- package/dist/module/src/lib/{classBuilder.test/classBuilder.test.specification.js → Tiposkripto.test/Tiposkripto.specification.js} +12 -8
- package/dist/module/src/lib/abstractBase.test/MockGiven.js +9 -2
- package/dist/module/src/lib/abstractBase.test/MockThen.js +5 -2
- package/dist/module/src/lib/abstractBase.test/MockWhen.js +9 -2
- package/dist/module/src/lib/abstractBase.test/adapter.js +18 -6
- package/dist/module/src/lib/abstractBase.test/implementation.js +3 -3
- package/dist/module/src/lib/mocks.test.js +11 -5
- package/dist/module/src/run.js +15 -4
- package/dist/module/testeranto.config.js +12 -36
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.js +1461 -8949
- package/dist/prebuild/run.mjs +25 -14
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/Node.d.ts +2 -2
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +1 -15
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +1 -15
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +1 -15
- package/dist/types/src/Pure.d.ts +2 -2
- package/dist/types/src/Pure.test.d.ts +1 -58
- package/dist/types/src/ReportServer.test.ts/index.d.ts +1 -28
- package/dist/types/src/Types.d.ts +3 -1
- package/dist/types/src/Web.d.ts +2 -2
- package/dist/types/src/components/pure/AppFrame.test/index.d.ts +1 -3
- package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +1 -1
- package/dist/types/src/components/pure/ModalContent.test/index.d.ts +1 -2
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +1 -1
- package/dist/types/src/components/pure/TestPageView.test/index.d.ts +1 -1
- package/dist/types/src/lib/BaseGiven.d.ts +44 -0
- package/dist/types/src/lib/BaseSuite.d.ts +12 -7
- package/dist/types/src/lib/BaseSuite.test/mock.d.ts +3 -1
- package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +1 -2
- package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +1 -2
- package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +1 -2
- package/dist/types/src/lib/BaseThen.d.ts +27 -0
- package/dist/types/src/lib/BaseWhen.d.ts +27 -0
- package/dist/types/src/lib/Tiposkripto.d.ts +35 -0
- package/dist/types/src/lib/{core.test/MockCore.d.ts → Tiposkripto.test/MockTiposkripto.d.ts} +3 -3
- package/dist/types/src/lib/{core.test/core.test.adapter.d.ts → Tiposkripto.test/Tiposkripto.adapter.d.ts} +1 -1
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.d.ts +2 -0
- package/dist/types/src/lib/{core.test/core.test.implementation.d.ts → Tiposkripto.test/Tiposkripto.implementation.d.ts} +1 -1
- package/dist/types/src/lib/{core.test/core.test.specification.d.ts → Tiposkripto.test/Tiposkripto.specification.d.ts} +1 -1
- package/dist/types/src/lib/{classBuilder.test/classBuilder.test.types.d.ts → Tiposkripto.test/Tiposkripto.types.d.ts} +11 -9
- package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +3 -1
- package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +1 -1
- package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +1 -1
- package/dist/types/src/lib/abstractBase.test/index.d.ts +1 -2
- package/dist/types/src/lib/abstractBase.test/types.d.ts +3 -3
- package/dist/types/src/lib/index.d.ts +1 -1
- package/dist/types/src/lib/mocks.test.d.ts +0 -2
- package/dist/types/src/lib/pmProxy.test/index.d.ts +1 -2
- package/dist/types/src/lib/types.d.ts +3 -1
- package/dist/types/src/mothership/test.d.ts +1 -18
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/App.tsx +27 -5
- package/src/Node.ts +3 -2
- package/src/PM/main.ts +1 -1
- package/src/Pure.ts +3 -2
- package/src/Types.ts +5 -3
- package/src/Web.ts +2 -2
- package/src/components/DesignEditorPage.tsx +54 -21
- package/src/lib/BaseGiven.ts +193 -0
- package/src/lib/BaseSuite.test/mock.ts +9 -2
- package/src/lib/BaseSuite.ts +14 -1
- package/src/lib/BaseThen.ts +108 -0
- package/src/lib/BaseWhen.ts +91 -0
- package/src/lib/{core.test/MockCore.ts → Tiposkripto.test/MockTiposkripto.ts} +4 -7
- package/src/lib/{core.test/core.test.adapter.ts → Tiposkripto.test/Tiposkripto.adapter.ts} +12 -11
- package/src/lib/{classBuilder.test/classBuilder.test.implementation.ts → Tiposkripto.test/Tiposkripto.implementation.ts} +75 -78
- package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +109 -0
- package/src/lib/Tiposkripto.test/Tiposkripto.ts +15 -0
- package/src/lib/{classBuilder.test/classBuilder.test.types.ts → Tiposkripto.test/Tiposkripto.types.ts} +12 -9
- package/src/lib/Tiposkripto.ts +325 -0
- package/src/lib/abstractBase.test/MockGiven.ts +12 -2
- package/src/lib/abstractBase.test/MockThen.ts +7 -2
- package/src/lib/abstractBase.test/MockWhen.ts +10 -2
- package/src/lib/abstractBase.test/adapter.ts +20 -6
- package/src/lib/abstractBase.test/implementation.ts +6 -6
- package/src/lib/abstractBase.test/types.ts +3 -3
- package/src/lib/index.ts +9 -3
- package/src/lib/mocks.test.ts +10 -9
- package/src/lib/types.ts +3 -1
- package/src/run.ts +19 -4
- package/testeranto/App.js +1461 -8949
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +1121 -9
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +979 -8
- package/testeranto/bundles/{pure/core/chunk-62UVCSQC.mjs → web/core/src/lib/BaseSuite.test/web.test.mjs} +721 -431
- package/testeranto/metafiles/node/core.json +264 -2180
- package/testeranto/metafiles/pure/core.json +147 -288
- package/testeranto/metafiles/web/core.json +16949 -18
- package/testeranto/reports/core/config.json +8 -40
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +8 -13
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +66 -2
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +2 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +16 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +68 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +56 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +22 -3
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +2 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +16 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +88 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +45 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/error.log +0 -3
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/info.log +2 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/lint_errors.txt +47 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/prompt.txt +17 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/tests.json +57 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/type_errors.txt +99 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +1 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +7 -9
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +11 -16
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +11 -16
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +15 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +29 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +56 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +18 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +32 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -1
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +60 -82
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +8 -13
- package/testeranto/reports/core/summary.json +23 -36
- package/testeranto.config.ts +14 -41
- package/tsc.log +274 -455
- package/dist/common/src/lib/abstractBase.js +0 -196
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +0 -25
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +0 -113
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +0 -46
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.node.js +0 -12
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.pure.js +0 -12
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +0 -18
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.web.js +0 -12
- package/dist/common/src/lib/basebuilder.js +0 -88
- package/dist/common/src/lib/classBuilder.js +0 -36
- package/dist/common/src/lib/classBuilder.test/classBuilder.test.adapter.js +0 -23
- package/dist/common/src/lib/classBuilder.test/classBuilder.test.js +0 -12
- package/dist/common/src/lib/classBuilder.test/classBuilder.test.types.js +0 -2
- package/dist/common/src/lib/classBuilder.test/mock.js +0 -17
- package/dist/common/src/lib/core.js +0 -45
- package/dist/common/src/lib/core.test/core.test.implementation.js +0 -121
- package/dist/common/src/lib/core.test/core.test.js +0 -63
- package/dist/common/src/lib/core.test/core.test.specification.js +0 -53
- package/dist/common/src/lib/core.test/core.test.types.js +0 -2
- package/dist/module/src/lib/abstractBase.js +0 -190
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +0 -22
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +0 -110
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +0 -42
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.node.js +0 -7
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.pure.js +0 -7
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +0 -14
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.web.js +0 -7
- package/dist/module/src/lib/basebuilder.js +0 -84
- package/dist/module/src/lib/classBuilder.js +0 -32
- package/dist/module/src/lib/classBuilder.test/classBuilder.test.adapter.js +0 -20
- package/dist/module/src/lib/classBuilder.test/classBuilder.test.js +0 -7
- package/dist/module/src/lib/classBuilder.test/classBuilder.test.types.js +0 -1
- package/dist/module/src/lib/classBuilder.test/mock.js +0 -14
- package/dist/module/src/lib/core.js +0 -42
- package/dist/module/src/lib/core.test/core.test.implementation.js +0 -118
- package/dist/module/src/lib/core.test/core.test.js +0 -58
- package/dist/module/src/lib/core.test/core.test.specification.js +0 -49
- package/dist/module/src/lib/core.test/core.test.types.js +0 -1
- package/dist/types/src/lib/abstractBase.d.ts +0 -70
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.adapter.d.ts +0 -3
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.implementation.d.ts +0 -3
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.mock.d.ts +0 -15
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.node.d.ts +0 -3
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.pure.d.ts +0 -3
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.specification.d.ts +0 -3
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +0 -22
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.web.d.ts +0 -3
- package/dist/types/src/lib/basebuilder.d.ts +0 -23
- package/dist/types/src/lib/classBuilder.d.ts +0 -15
- package/dist/types/src/lib/classBuilder.test/classBuilder.test.adapter.d.ts +0 -3
- package/dist/types/src/lib/classBuilder.test/classBuilder.test.d.ts +0 -3
- package/dist/types/src/lib/classBuilder.test/classBuilder.test.implementation.d.ts +0 -3
- package/dist/types/src/lib/classBuilder.test/classBuilder.test.specification.d.ts +0 -3
- package/dist/types/src/lib/classBuilder.test/mock.d.ts +0 -14
- package/dist/types/src/lib/core.d.ts +0 -12
- package/dist/types/src/lib/core.test/core.test.d.ts +0 -3
- package/dist/types/src/lib/core.test/core.test.types.d.ts +0 -46
- package/src/lib/abstractBase.ts +0 -351
- package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +0 -29
- package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +0 -139
- package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +0 -90
- package/src/lib/baseBuilder.test/baseBuilder.test.node.ts +0 -16
- package/src/lib/baseBuilder.test/baseBuilder.test.pure.ts +0 -16
- package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +0 -35
- package/src/lib/baseBuilder.test/baseBuilder.test.types.ts +0 -36
- package/src/lib/baseBuilder.test/baseBuilder.test.web.ts +0 -16
- package/src/lib/basebuilder.ts +0 -187
- package/src/lib/classBuilder.test/classBuilder.test.adapter.ts +0 -25
- package/src/lib/classBuilder.test/classBuilder.test.specification.ts +0 -104
- package/src/lib/classBuilder.test/classBuilder.test.ts +0 -14
- package/src/lib/classBuilder.test/mock.ts +0 -83
- package/src/lib/classBuilder.ts +0 -120
- package/src/lib/core.test/core.test.implementation.ts +0 -155
- package/src/lib/core.test/core.test.specification.ts +0 -113
- package/src/lib/core.test/core.test.ts +0 -72
- package/src/lib/core.test/core.test.types.ts +0 -68
- package/src/lib/core.ts +0 -125
- package/testeranto/bundles/node/core/chunk-4CSH4UJE.mjs +0 -872
- package/testeranto/bundles/node/core/chunk-4JTDLQVA.mjs +0 -253
- package/testeranto/bundles/node/core/chunk-C3APFDUV.mjs +0 -70
- package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -243
- package/testeranto/bundles/node/core/src/lib/classBuilder.test/classBuilder.test.mjs +0 -411
- package/testeranto/bundles/node/core/src/lib/core.test/core.test.mjs +0 -494
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +0 -4755
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +0 -410
- package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -241
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +0 -15
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +0 -15
- package/testeranto/bundles/web/core/src/components/pure/TestPageView.test/index.html +0 -15
- package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -15
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/exit.log +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -10
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/stdout.log +0 -6
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-1/butThen/artifact_test.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -71
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -42
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -10
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -42
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/debug.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/error.log +0 -3
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/exit.log +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/info.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/exit.log +0 -1
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stdout.log +0 -619
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/tests.json +0 -165
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +0 -88
- package/testeranto/reports/core/src/lib/core.test/core.test/node/exit.log +0 -1
- package/testeranto/reports/core/src/lib/core.test/core.test/node/lint_errors.txt +0 -21
- package/testeranto/reports/core/src/lib/core.test/core.test/node/prompt.txt +0 -19
- package/testeranto/reports/core/src/lib/core.test/core.test/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/type_errors.txt +0 -45
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +0 -152
- package/testeranto/reportsweb_build_errors +0 -546
- /package/dist/common/src/lib/{baseBuilder.test/baseBuilder.test.types.js → Tiposkripto.test/Tiposkripto.types.js} +0 -0
- /package/dist/module/src/lib/{baseBuilder.test/baseBuilder.test.types.js → Tiposkripto.test/Tiposkripto.types.js} +0 -0
- /package/testeranto/reports/core/src/{lib/classBuilder.test/classBuilder.test/node → components/pure/FeaturesReporterView.test/index/web}/lint_errors.txt +0 -0
- /package/testeranto/reports/core/src/{lib/baseBuilder.test/baseBuilder.test.node/node → components/pure/FeaturesReporterView.test/index/web}/message.txt +0 -0
- /package/testeranto/reports/core/src/{lib/baseBuilder.test/baseBuilder.test.pure/pure → components/pure/ProjectPageView.test/index/web}/message.txt +0 -0
- /package/testeranto/reports/core/src/{lib/classBuilder.test/classBuilder.test/node → components/pure/TestPageView.test/index/web}/message.txt +0 -0
- /package/testeranto/reports/core/src/lib/{baseBuilder.test/baseBuilder.test.node/node/stderr.log → BaseSuite.test/web.test/web/lint_errors.txt} +0 -0
- /package/testeranto/reports/core/src/lib/{core.test/core.test/node → BaseSuite.test/web.test/web}/message.txt +0 -0
- /package/testeranto/reports/core/src/lib/{baseBuilder.test/baseBuilder.test.pure/pure/exit.log → TipoSkripto.test/TipoSkripto/node/lint_errors.txt} +0 -0
- /package/testeranto/reports/core/src/lib/{core.test/core.test → TipoSkripto.test/TipoSkripto}/node/stdout.log +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testeranto",
|
|
3
3
|
"description": "the AI powered BDD test framework for typescript projects",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.198.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "18.18.0"
|
|
7
7
|
},
|
|
@@ -163,7 +163,8 @@
|
|
|
163
163
|
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
164
164
|
"@typescript-eslint/parser": "^5.46.0",
|
|
165
165
|
"self-import": "*",
|
|
166
|
-
"testeranto-react": "0.0.
|
|
166
|
+
"testeranto-react": "0.0.9",
|
|
167
|
+
"testeranto-stilo": "0.0.7",
|
|
167
168
|
"ts-node": "^10.9.1",
|
|
168
169
|
"typescript": "^5.8.2"
|
|
169
170
|
},
|
|
@@ -227,7 +228,6 @@
|
|
|
227
228
|
"react-router-dom": "^7.7.0",
|
|
228
229
|
"sass": "^1.90.0",
|
|
229
230
|
"ssml-check": "^0.4.6",
|
|
230
|
-
"testeranto-stilo": "0.0.7",
|
|
231
231
|
"tsc-prog": "^2.3.0",
|
|
232
232
|
"tsx": "^4.19.3",
|
|
233
233
|
"type-fest": "^4.41.0",
|
|
@@ -241,4 +241,4 @@
|
|
|
241
241
|
"xterm-addon-fit": "^0.8.0",
|
|
242
242
|
"xterm-react": "^1.0.0"
|
|
243
243
|
}
|
|
244
|
-
}
|
|
244
|
+
}
|
package/src/App.tsx
CHANGED
|
@@ -38,18 +38,40 @@ export const App = () => {
|
|
|
38
38
|
// Export App to global scope
|
|
39
39
|
function initApp() {
|
|
40
40
|
const rootElement = document.getElementById('root');
|
|
41
|
-
if (rootElement
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if (rootElement) {
|
|
42
|
+
try {
|
|
43
|
+
// Try to use React 18's createRoot if available
|
|
44
|
+
if (ReactDom.createRoot) {
|
|
45
|
+
const root = ReactDom.createRoot(rootElement);
|
|
46
|
+
root.render(React.createElement(App));
|
|
47
|
+
} else {
|
|
48
|
+
// Fall back to React 17's render
|
|
49
|
+
ReactDom.render(React.createElement(App), rootElement);
|
|
50
|
+
}
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.error('Error rendering app:', err);
|
|
53
|
+
// Retry if React isn't loaded yet
|
|
54
|
+
setTimeout(initApp, 100);
|
|
55
|
+
}
|
|
44
56
|
} else {
|
|
45
|
-
// Retry if
|
|
57
|
+
// Retry if root element isn't available yet
|
|
46
58
|
setTimeout(initApp, 100);
|
|
47
59
|
}
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
// Export App to global scope
|
|
51
|
-
if (typeof window !== 'undefined') {
|
|
63
|
+
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
64
|
+
// @ts-ignore
|
|
52
65
|
window.App = App;
|
|
66
|
+
// @ts-ignore
|
|
53
67
|
window.React = React;
|
|
68
|
+
// @ts-ignore
|
|
54
69
|
window.ReactDOM = ReactDom;
|
|
70
|
+
|
|
71
|
+
// Initialize the app when the window is ready
|
|
72
|
+
if (document.readyState === 'loading') {
|
|
73
|
+
document.addEventListener('DOMContentLoaded', initApp);
|
|
74
|
+
} else {
|
|
75
|
+
initApp();
|
|
76
|
+
}
|
|
55
77
|
}
|
package/src/Node.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Testeranto from "./lib/core.js";
|
|
1
|
+
// import Testeranto from "./lib/core.js";
|
|
2
2
|
import {
|
|
3
3
|
defaultTestResourceRequirement,
|
|
4
4
|
ITTestResourceRequest,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Ibdd_out_any,
|
|
13
13
|
Ibdd_out,
|
|
14
14
|
} from "./CoreTypes.js";
|
|
15
|
+
import Tiposkripto from "./lib/Tiposkripto.js";
|
|
15
16
|
|
|
16
17
|
let ipcfile;
|
|
17
18
|
|
|
@@ -19,7 +20,7 @@ export class NodeTesteranto<
|
|
|
19
20
|
I extends Ibdd_in_any,
|
|
20
21
|
O extends Ibdd_out_any,
|
|
21
22
|
M
|
|
22
|
-
> extends
|
|
23
|
+
> extends Tiposkripto<I, O, M> {
|
|
23
24
|
constructor(
|
|
24
25
|
input: I["iinput"],
|
|
25
26
|
testSpecification: ITestSpecification<I, O>,
|
package/src/PM/main.ts
CHANGED
package/src/Pure.ts
CHANGED
|
@@ -5,12 +5,13 @@ import {
|
|
|
5
5
|
ITestAdapter,
|
|
6
6
|
ITestSpecification,
|
|
7
7
|
} from "./CoreTypes.js";
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import {
|
|
10
10
|
defaultTestResourceRequirement,
|
|
11
11
|
ITTestResourceConfiguration,
|
|
12
12
|
ITTestResourceRequest,
|
|
13
13
|
} from "./lib/index.js";
|
|
14
|
+
import Tiposkripto from "./lib/Tiposkripto.js";
|
|
14
15
|
|
|
15
16
|
import { PM_Pure } from "./PM/pure.js";
|
|
16
17
|
|
|
@@ -18,7 +19,7 @@ export class PureTesteranto<
|
|
|
18
19
|
I extends Ibdd_in_any,
|
|
19
20
|
O extends Ibdd_out,
|
|
20
21
|
M
|
|
21
|
-
> extends
|
|
22
|
+
> extends Tiposkripto<I, O, M> {
|
|
22
23
|
constructor(
|
|
23
24
|
input: I["iinput"],
|
|
24
25
|
testSpecification: ITestSpecification<I, O>,
|
package/src/Types.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { Plugin } from "esbuild";
|
|
3
|
+
|
|
3
4
|
import { ITTestResourceConfiguration } from "./lib/index.js";
|
|
4
5
|
import { PM } from "./PM/index.js";
|
|
5
|
-
|
|
6
|
-
import { BaseWhen, BaseThen, BaseGiven, IGivens } from "./lib/abstractBase.js";
|
|
7
|
-
|
|
8
6
|
import { Ibdd_in_any, Ibdd_out_any } from "./CoreTypes.js";
|
|
7
|
+
|
|
9
8
|
import { BaseSuite } from "./lib/BaseSuite.js";
|
|
9
|
+
import { IGivens, BaseGiven } from "./lib/BaseGiven.js";
|
|
10
|
+
import { BaseThen } from "./lib/BaseThen.js";
|
|
11
|
+
import { BaseWhen } from "./lib/BaseWhen.js";
|
|
10
12
|
|
|
11
13
|
export type ISummary = Record<
|
|
12
14
|
string,
|
package/src/Web.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
Ibdd_out,
|
|
10
10
|
} from "./CoreTypes";
|
|
11
11
|
import { PM_Web } from "./PM/web";
|
|
12
|
+
import Tiposkripto from "./lib/Tiposkripto";
|
|
12
13
|
|
|
13
|
-
import Testeranto from "./lib/core.js";
|
|
14
14
|
import {
|
|
15
15
|
ITTestResourceConfiguration,
|
|
16
16
|
ITTestResourceRequest,
|
|
@@ -29,7 +29,7 @@ export class WebTesteranto<
|
|
|
29
29
|
I extends Ibdd_in_any,
|
|
30
30
|
O extends Ibdd_out,
|
|
31
31
|
M
|
|
32
|
-
> extends
|
|
32
|
+
> extends Tiposkripto<I, O, M> {
|
|
33
33
|
constructor(
|
|
34
34
|
input: I["iinput"],
|
|
35
35
|
testSpecification: ITestSpecification<I, O>,
|
|
@@ -5,7 +5,7 @@ import { saveAs } from 'file-saver';
|
|
|
5
5
|
|
|
6
6
|
export const DesignEditorPage = () => {
|
|
7
7
|
const [projectId, setProjectId] = useState('default-project');
|
|
8
|
-
const [fileHandle, setFileHandle] = useState<
|
|
8
|
+
const [fileHandle, setFileHandle] = useState<any>(null);
|
|
9
9
|
|
|
10
10
|
const handleSave = async () => {
|
|
11
11
|
try {
|
|
@@ -32,16 +32,43 @@ export const DesignEditorPage = () => {
|
|
|
32
32
|
designEditorRef.current.loadDesign(fullDesign);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
let newHandle;
|
|
36
|
+
if ('showSaveFilePicker' in window && (window as any).showSaveFilePicker) {
|
|
37
|
+
try {
|
|
38
|
+
newHandle = await (window as any).showSaveFilePicker({
|
|
39
|
+
types: [{
|
|
40
|
+
description: 'Design Files',
|
|
41
|
+
accept: {
|
|
42
|
+
'application/json': ['.json'],
|
|
43
|
+
},
|
|
44
|
+
}],
|
|
45
|
+
suggestedName: `${projectId}.json`
|
|
46
|
+
});
|
|
47
|
+
} catch (err) {
|
|
48
|
+
console.warn('Error using showSaveFilePicker:', err);
|
|
49
|
+
// Fall back to traditional download
|
|
50
|
+
const jsonData = JSON.stringify(fullDesign, null, 2);
|
|
51
|
+
const blob = new Blob([jsonData], { type: 'application/json' });
|
|
52
|
+
const url = URL.createObjectURL(blob);
|
|
53
|
+
const a = document.createElement('a');
|
|
54
|
+
a.href = url;
|
|
55
|
+
a.download = `${projectId}.json`;
|
|
56
|
+
a.click();
|
|
57
|
+
URL.revokeObjectURL(url);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
// Fall back to traditional download
|
|
62
|
+
const jsonData = JSON.stringify(fullDesign, null, 2);
|
|
63
|
+
const blob = new Blob([jsonData], { type: 'application/json' });
|
|
64
|
+
const url = URL.createObjectURL(blob);
|
|
65
|
+
const a = document.createElement('a');
|
|
66
|
+
a.href = url;
|
|
67
|
+
a.download = `${projectId}.json`;
|
|
68
|
+
a.click();
|
|
69
|
+
URL.revokeObjectURL(url);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
45
72
|
|
|
46
73
|
const jsonData = JSON.stringify(fullDesign, null, 2);
|
|
47
74
|
const writable = await newHandle.createWritable();
|
|
@@ -61,7 +88,7 @@ export const DesignEditorPage = () => {
|
|
|
61
88
|
}
|
|
62
89
|
};
|
|
63
90
|
|
|
64
|
-
const [design, setDesign] = useState<
|
|
91
|
+
const [design, setDesign] = useState<any>(null);
|
|
65
92
|
const designEditorRef = useRef<DesignEditorRef>(null);
|
|
66
93
|
|
|
67
94
|
const handleOpen = async () => {
|
|
@@ -72,15 +99,21 @@ export const DesignEditorPage = () => {
|
|
|
72
99
|
}
|
|
73
100
|
|
|
74
101
|
console.log('Attempting to show file picker...');
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
102
|
+
let handle;
|
|
103
|
+
if ('showOpenFilePicker' in window) {
|
|
104
|
+
// @ts-ignore
|
|
105
|
+
[handle] = await window.showOpenFilePicker({
|
|
106
|
+
types: [{
|
|
107
|
+
description: 'Design Files',
|
|
108
|
+
accept: {
|
|
109
|
+
'application/json': ['.json'],
|
|
110
|
+
},
|
|
111
|
+
}],
|
|
112
|
+
multiple: false
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
throw new Error('File System Access API not supported');
|
|
116
|
+
}
|
|
84
117
|
|
|
85
118
|
if (!handle) {
|
|
86
119
|
throw new Error('No file selected');
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
|
|
4
|
+
// Do not add logging to this file as it is used by the pure runtime.
|
|
5
|
+
|
|
6
|
+
import type { Ibdd_in_any, Ibdd_out_any } from "../CoreTypes";
|
|
7
|
+
|
|
8
|
+
import { ITestArtifactory, ITLog, ITTestResourceConfiguration } from ".";
|
|
9
|
+
import { IPM } from "./types.js";
|
|
10
|
+
import { afterEachProxy, beforeEachProxy } from "./pmProxy.js";
|
|
11
|
+
import { BaseSuite } from "./BaseSuite";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents a collection of Given conditions keyed by their names.
|
|
15
|
+
* Givens are typically organized as named collections because:
|
|
16
|
+
* - They set up different initial states for tests
|
|
17
|
+
* - Tests often need to reference specific Given conditions by name
|
|
18
|
+
* - This allows for better organization and reuse of setup logic
|
|
19
|
+
* - The BDD pattern often involves multiple named Given scenarios
|
|
20
|
+
*/
|
|
21
|
+
export type IGivens<I extends Ibdd_in_any> = Record<string, BaseGiven<I>>;
|
|
22
|
+
|
|
23
|
+
export abstract class BaseGiven<I extends Ibdd_in_any> {
|
|
24
|
+
name: string;
|
|
25
|
+
features: string[];
|
|
26
|
+
whens: any[];
|
|
27
|
+
thens: any[];
|
|
28
|
+
error: Error;
|
|
29
|
+
fail: any;
|
|
30
|
+
store: I["istore"];
|
|
31
|
+
recommendedFsPath: string;
|
|
32
|
+
givenCB: I["given"];
|
|
33
|
+
initialValues: any;
|
|
34
|
+
key: string;
|
|
35
|
+
failed: boolean;
|
|
36
|
+
artifacts: string[] = [];
|
|
37
|
+
|
|
38
|
+
addArtifact(path: string) {
|
|
39
|
+
const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
|
|
40
|
+
this.artifacts.push(normalizedPath);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
name: string,
|
|
45
|
+
features: string[],
|
|
46
|
+
whens: any[],
|
|
47
|
+
thens: any[],
|
|
48
|
+
givenCB: I["given"],
|
|
49
|
+
initialValues: any
|
|
50
|
+
) {
|
|
51
|
+
this.name = name;
|
|
52
|
+
this.features = features || [];
|
|
53
|
+
this.whens = whens || [];
|
|
54
|
+
this.thens = thens || [];
|
|
55
|
+
this.givenCB = givenCB;
|
|
56
|
+
this.initialValues = initialValues;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
beforeAll(store: I["istore"]) {
|
|
60
|
+
return store;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
toObj() {
|
|
64
|
+
return {
|
|
65
|
+
key: this.key,
|
|
66
|
+
name: this.name,
|
|
67
|
+
whens: (this.whens || []).map((w) => {
|
|
68
|
+
if (w && w.toObj) return w.toObj();
|
|
69
|
+
|
|
70
|
+
console.error("w is not as expected!", JSON.stringify(w));
|
|
71
|
+
return {};
|
|
72
|
+
}),
|
|
73
|
+
thens: (this.thens || []).map((t) => t && t.toObj ? t.toObj() : {}),
|
|
74
|
+
error: this.error ? [this.error, this.error.stack] : null,
|
|
75
|
+
failed: this.failed,
|
|
76
|
+
features: this.features || [],
|
|
77
|
+
artifacts: this.artifacts || [],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
abstract givenThat(
|
|
82
|
+
subject: I["isubject"],
|
|
83
|
+
testResourceConfiguration,
|
|
84
|
+
artifactory: ITestArtifactory,
|
|
85
|
+
givenCB: I["given"],
|
|
86
|
+
initialValues: any,
|
|
87
|
+
pm: IPM
|
|
88
|
+
): Promise<I["istore"]>;
|
|
89
|
+
|
|
90
|
+
async afterEach(
|
|
91
|
+
store: I["istore"],
|
|
92
|
+
key: string,
|
|
93
|
+
artifactory: ITestArtifactory,
|
|
94
|
+
pm: IPM
|
|
95
|
+
): Promise<I["istore"]> {
|
|
96
|
+
return store;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
abstract uberCatcher(e);
|
|
100
|
+
|
|
101
|
+
async give(
|
|
102
|
+
subject: I["isubject"],
|
|
103
|
+
key: string,
|
|
104
|
+
testResourceConfiguration: ITTestResourceConfiguration,
|
|
105
|
+
tester: (t: Awaited<I["then"]> | undefined) => boolean,
|
|
106
|
+
artifactory: ITestArtifactory,
|
|
107
|
+
tLog: ITLog,
|
|
108
|
+
pm: IPM,
|
|
109
|
+
suiteNdx: number
|
|
110
|
+
) {
|
|
111
|
+
this.key = key;
|
|
112
|
+
|
|
113
|
+
tLog(`\n ${this.key}`);
|
|
114
|
+
tLog(`\n Given: ${this.name}`);
|
|
115
|
+
|
|
116
|
+
const givenArtifactory = (fPath: string, value: unknown) =>
|
|
117
|
+
artifactory(`given-${key}/${fPath}`, value);
|
|
118
|
+
|
|
119
|
+
this.uberCatcher((e) => {
|
|
120
|
+
console.error(e.toString());
|
|
121
|
+
this.error = e.error;
|
|
122
|
+
tLog(e.stack);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
// Ensure addArtifact is properly bound to 'this'
|
|
127
|
+
const addArtifact = this.addArtifact.bind(this);
|
|
128
|
+
const proxiedPm = beforeEachProxy(pm, suiteNdx.toString(), addArtifact);
|
|
129
|
+
this.store = await this.givenThat(
|
|
130
|
+
subject,
|
|
131
|
+
testResourceConfiguration,
|
|
132
|
+
givenArtifactory,
|
|
133
|
+
this.givenCB,
|
|
134
|
+
this.initialValues,
|
|
135
|
+
proxiedPm
|
|
136
|
+
);
|
|
137
|
+
} catch (e) {
|
|
138
|
+
// console.error("Given failure: ", e.stack);
|
|
139
|
+
this.failed = true;
|
|
140
|
+
this.error = e.stack;
|
|
141
|
+
// throw e;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
// tLog(`\n Given this.store`, this.store);
|
|
146
|
+
|
|
147
|
+
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
148
|
+
await whenStep.test(
|
|
149
|
+
this.store,
|
|
150
|
+
testResourceConfiguration,
|
|
151
|
+
tLog,
|
|
152
|
+
pm,
|
|
153
|
+
`suite-${suiteNdx}/given-${key}/when/${whenNdx}`
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
158
|
+
const t = await thenStep.test(
|
|
159
|
+
this.store,
|
|
160
|
+
testResourceConfiguration,
|
|
161
|
+
tLog,
|
|
162
|
+
pm,
|
|
163
|
+
`suite-${suiteNdx}/given-${key}/then-${thenNdx}`
|
|
164
|
+
);
|
|
165
|
+
tester(t);
|
|
166
|
+
}
|
|
167
|
+
} catch (e) {
|
|
168
|
+
this.error = e.stack;
|
|
169
|
+
this.failed = true;
|
|
170
|
+
// tLog(e.stack);
|
|
171
|
+
// throw e;
|
|
172
|
+
} finally {
|
|
173
|
+
try {
|
|
174
|
+
// Ensure addArtifact is properly bound to 'this'
|
|
175
|
+
const addArtifact = this.addArtifact.bind(this);
|
|
176
|
+
const proxiedPm = afterEachProxy(
|
|
177
|
+
pm,
|
|
178
|
+
suiteNdx.toString(),
|
|
179
|
+
key,
|
|
180
|
+
addArtifact
|
|
181
|
+
);
|
|
182
|
+
// (proxiedPm as any).currentStep = this;
|
|
183
|
+
await this.afterEach(this.store, this.key, givenArtifactory, proxiedPm);
|
|
184
|
+
} catch (e) {
|
|
185
|
+
this.failed = e;
|
|
186
|
+
throw e;
|
|
187
|
+
// this.error = e.message;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return this.store;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
|
|
4
|
-
import { BaseGiven
|
|
4
|
+
import { BaseGiven } from "../BaseGiven";
|
|
5
5
|
import { BaseSuite } from "../BaseSuite";
|
|
6
|
+
import { BaseThen } from "../BaseThen";
|
|
7
|
+
import { BaseWhen } from "../BaseWhen";
|
|
6
8
|
import { IPM } from "../types";
|
|
9
|
+
|
|
7
10
|
import { I, TestStore, TestSelection, O } from "./test";
|
|
8
11
|
|
|
9
12
|
export class MockGiven extends BaseGiven<I> {
|
|
@@ -77,7 +80,11 @@ export class MockSuite extends BaseSuite<I, O> {
|
|
|
77
80
|
testGiven: new MockGiven(
|
|
78
81
|
"testGiven",
|
|
79
82
|
["testFeature"],
|
|
80
|
-
[
|
|
83
|
+
[
|
|
84
|
+
new MockWhen("testWhen", async () =>
|
|
85
|
+
Promise.resolve({ testSelection: true })
|
|
86
|
+
),
|
|
87
|
+
],
|
|
81
88
|
[
|
|
82
89
|
new MockThen("testThen", async () =>
|
|
83
90
|
Promise.resolve(new BaseSuite("temp", 0, {} as any))
|
package/src/lib/BaseSuite.ts
CHANGED
|
@@ -4,10 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import { ITTestResourceConfiguration, ITestArtifactory } from ".";
|
|
6
6
|
import { Ibdd_in_any, Ibdd_out_any } from "../CoreTypes";
|
|
7
|
-
import { IGivens } from "./
|
|
7
|
+
import { IGivens } from "./BaseGiven";
|
|
8
8
|
import { beforeAllProxy, afterAllProxy } from "./pmProxy";
|
|
9
9
|
import { IPM } from "./types";
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Represents a collection of test suites keyed by their names.
|
|
13
|
+
* Suites are organized as named collections because:
|
|
14
|
+
* - Tests are typically grouped into logical suites (e.g., by feature, component)
|
|
15
|
+
* - Suites may have different configurations or setup requirements
|
|
16
|
+
* - Named suites allow for selective test execution and better reporting
|
|
17
|
+
* - This supports the hierarchical structure of test organization
|
|
18
|
+
*/
|
|
19
|
+
export type ISuites<I extends Ibdd_in_any, O extends Ibdd_out_any> = Record<
|
|
20
|
+
string,
|
|
21
|
+
BaseSuite<I, O>
|
|
22
|
+
>;
|
|
23
|
+
|
|
11
24
|
export abstract class BaseSuite<I extends Ibdd_in_any, O extends Ibdd_out_any> {
|
|
12
25
|
name: string;
|
|
13
26
|
givens: IGivens<I>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
|
|
4
|
+
// Do not add logging to this file as it is used by the pure runtime.
|
|
5
|
+
|
|
6
|
+
import type { Ibdd_in_any } from "../CoreTypes";
|
|
7
|
+
|
|
8
|
+
import { ITLog, ITTestResourceConfiguration } from ".";
|
|
9
|
+
import { IPM } from "./types.js";
|
|
10
|
+
import { butThenProxy } from "./pmProxy.js";
|
|
11
|
+
|
|
12
|
+
export abstract class BaseThen<I extends Ibdd_in_any> {
|
|
13
|
+
public name: string;
|
|
14
|
+
thenCB: (storeState: I["iselection"], pm: IPM) => Promise<I["then"]>;
|
|
15
|
+
error: boolean;
|
|
16
|
+
artifacts: string[] = [];
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
name: string,
|
|
20
|
+
thenCB: (val: I["iselection"]) => Promise<I["then"]>
|
|
21
|
+
) {
|
|
22
|
+
this.name = name;
|
|
23
|
+
this.thenCB = thenCB;
|
|
24
|
+
this.error = false;
|
|
25
|
+
this.artifacts = [];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
addArtifact(path: string) {
|
|
29
|
+
const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
|
|
30
|
+
this.artifacts.push(normalizedPath);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
toObj() {
|
|
34
|
+
const obj = {
|
|
35
|
+
name: this.name,
|
|
36
|
+
error: this.error,
|
|
37
|
+
artifacts: this.artifacts,
|
|
38
|
+
};
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
abstract butThen(
|
|
43
|
+
store: I["istore"],
|
|
44
|
+
thenCB: (s: I["iselection"]) => Promise<I["isubject"]>,
|
|
45
|
+
testResourceConfiguration: ITTestResourceConfiguration,
|
|
46
|
+
pm: IPM
|
|
47
|
+
): Promise<I["iselection"]>;
|
|
48
|
+
|
|
49
|
+
async test(
|
|
50
|
+
store: I["istore"],
|
|
51
|
+
testResourceConfiguration,
|
|
52
|
+
tLog: ITLog,
|
|
53
|
+
pm: IPM,
|
|
54
|
+
filepath: string
|
|
55
|
+
): Promise<I["then"] | undefined> {
|
|
56
|
+
// Ensure addArtifact is properly bound to 'this'
|
|
57
|
+
const addArtifact = this.addArtifact.bind(this);
|
|
58
|
+
const proxiedPm = butThenProxy(pm, filepath, addArtifact);
|
|
59
|
+
return this.butThen(
|
|
60
|
+
store,
|
|
61
|
+
async (s: I["iselection"]) => {
|
|
62
|
+
try {
|
|
63
|
+
if (typeof this.thenCB === "function") {
|
|
64
|
+
// Add debug logging to see what's being passed to thenCB
|
|
65
|
+
|
|
66
|
+
// Check if the thenCB is spreading the arguments incorrectly
|
|
67
|
+
// Wrap the proxy to see what's happening when writeFileSync is called
|
|
68
|
+
const wrappedPm = new Proxy(proxiedPm, {
|
|
69
|
+
get: (target, prop, receiver) => {
|
|
70
|
+
if (prop === "writeFileSync") {
|
|
71
|
+
return (...args) => {
|
|
72
|
+
console.log(
|
|
73
|
+
`[DEBUG] writeFileSync called with args:`,
|
|
74
|
+
args
|
|
75
|
+
);
|
|
76
|
+
return target[prop](...args);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return target[prop];
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
const result = await this.thenCB(s, wrappedPm);
|
|
83
|
+
|
|
84
|
+
return result;
|
|
85
|
+
} else {
|
|
86
|
+
return this.thenCB;
|
|
87
|
+
}
|
|
88
|
+
} catch (e) {
|
|
89
|
+
console.error(e.stack);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
testResourceConfiguration,
|
|
93
|
+
proxiedPm
|
|
94
|
+
).catch((e) => {
|
|
95
|
+
this.error = e.stack;
|
|
96
|
+
// throw e;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Represents a collection of Then assertions keyed by their names.
|
|
102
|
+
* Thens are typically part of Given definitions rather than standalone collections,
|
|
103
|
+
* but this type exists for consistency and potential future use cases where:
|
|
104
|
+
* - Assertions might need to be reused or composed dynamically
|
|
105
|
+
* - Custom assertion libraries could benefit from named assertion collections
|
|
106
|
+
* - Advanced validation patterns require named Then conditions
|
|
107
|
+
*/
|
|
108
|
+
export type IThens<I extends Ibdd_in_any> = Record<string, BaseThen<I>>;
|