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/src/lib/classBuilder.ts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
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 { NonEmptyObject } from "type-fest";
|
|
7
|
-
|
|
8
|
-
import type {
|
|
9
|
-
Ibdd_in_any,
|
|
10
|
-
Ibdd_out_any,
|
|
11
|
-
ITestImplementation,
|
|
12
|
-
ITestSpecification,
|
|
13
|
-
} from "../CoreTypes";
|
|
14
|
-
|
|
15
|
-
import { BaseBuilder } from "./basebuilder.js";
|
|
16
|
-
import {
|
|
17
|
-
ISuiteKlasser,
|
|
18
|
-
IGivenKlasser,
|
|
19
|
-
IWhenKlasser,
|
|
20
|
-
IThenKlasser,
|
|
21
|
-
} from "./types.js";
|
|
22
|
-
import { ITTestResourceRequest } from "./index.js";
|
|
23
|
-
|
|
24
|
-
type IExtenstions = Record<string, unknown>;
|
|
25
|
-
|
|
26
|
-
export abstract class ClassBuilder<
|
|
27
|
-
I extends Ibdd_in_any = Ibdd_in_any,
|
|
28
|
-
O extends Ibdd_out_any = Ibdd_out_any,
|
|
29
|
-
M = unknown
|
|
30
|
-
> extends BaseBuilder<
|
|
31
|
-
I,
|
|
32
|
-
O,
|
|
33
|
-
IExtenstions,
|
|
34
|
-
IExtenstions,
|
|
35
|
-
IExtenstions,
|
|
36
|
-
IExtenstions
|
|
37
|
-
> {
|
|
38
|
-
constructor(
|
|
39
|
-
testImplementation: ITestImplementation<I, O, M> & {
|
|
40
|
-
suites: Record<string, NonEmptyObject<object>>;
|
|
41
|
-
givens: Record<string, any>;
|
|
42
|
-
whens: Record<string, any>;
|
|
43
|
-
thens: Record<string, any>;
|
|
44
|
-
},
|
|
45
|
-
testSpecification: ITestSpecification<I, O>,
|
|
46
|
-
input: I["iinput"],
|
|
47
|
-
suiteKlasser: ISuiteKlasser<I, O>,
|
|
48
|
-
givenKlasser: IGivenKlasser<I>,
|
|
49
|
-
whenKlasser: IWhenKlasser<I>,
|
|
50
|
-
thenKlasser: IThenKlasser<I>,
|
|
51
|
-
testResourceRequirement: ITTestResourceRequest
|
|
52
|
-
) {
|
|
53
|
-
const classySuites = Object.entries(testImplementation.suites).reduce(
|
|
54
|
-
(a, [key], index) => {
|
|
55
|
-
a[key] = (somestring, givens) => {
|
|
56
|
-
return new suiteKlasser.prototype.constructor(
|
|
57
|
-
somestring,
|
|
58
|
-
index,
|
|
59
|
-
givens
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
return a;
|
|
63
|
-
},
|
|
64
|
-
{}
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
const classyGivens = Object.entries(testImplementation.givens).reduce(
|
|
68
|
-
(a, [key, g]) => {
|
|
69
|
-
a[key] = (features, whens, thens, ...initialValues) => {
|
|
70
|
-
return new givenKlasser.prototype.constructor(
|
|
71
|
-
key,
|
|
72
|
-
features,
|
|
73
|
-
whens,
|
|
74
|
-
thens,
|
|
75
|
-
testImplementation.givens[key],
|
|
76
|
-
initialValues
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
return a;
|
|
80
|
-
},
|
|
81
|
-
{}
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const classyWhens = Object.entries(testImplementation.whens).reduce(
|
|
85
|
-
(a, [key, whEn]: [string, (...x: any[]) => any]) => {
|
|
86
|
-
a[key] = (...payload: any[]) => {
|
|
87
|
-
return new whenKlasser.prototype.constructor(
|
|
88
|
-
`${key}: ${payload && payload.toString()}`,
|
|
89
|
-
whEn(...payload)
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
return a;
|
|
93
|
-
},
|
|
94
|
-
{}
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
const classyThens = Object.entries(testImplementation.thens).reduce(
|
|
98
|
-
(a, [key, thEn]: [string, (...x: any[]) => any]) => {
|
|
99
|
-
a[key] = (...args: any[]) => {
|
|
100
|
-
return new thenKlasser.prototype.constructor(
|
|
101
|
-
`${key}: ${args && args.toString()}`,
|
|
102
|
-
thEn(...args)
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
return a;
|
|
106
|
-
},
|
|
107
|
-
{}
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
super(
|
|
111
|
-
input,
|
|
112
|
-
classySuites,
|
|
113
|
-
classyGivens,
|
|
114
|
-
classyWhens,
|
|
115
|
-
classyThens,
|
|
116
|
-
testResourceRequirement,
|
|
117
|
-
testSpecification
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { ITestImplementation } from "../../CoreTypes";
|
|
2
|
-
import { MockCore } from "./MockCore";
|
|
3
|
-
import { I, O, M } from "./core.test.types";
|
|
4
|
-
import { ITTestResourceRequest } from "..";
|
|
5
|
-
import { ITestAdapter } from "../../CoreTypes";
|
|
6
|
-
|
|
7
|
-
export const implementation: ITestImplementation<I, O, M> = {
|
|
8
|
-
suites: {
|
|
9
|
-
Default: "Testeranto test suite",
|
|
10
|
-
ExtendedSuite: "Extended Testeranto test suite",
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
givens: {
|
|
14
|
-
Default: () => {
|
|
15
|
-
const input = { debug: true };
|
|
16
|
-
const resourceReq = { ports: [3000] };
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const instance = new MockCore(
|
|
20
|
-
input,
|
|
21
|
-
specification,
|
|
22
|
-
implementation,
|
|
23
|
-
resourceReq,
|
|
24
|
-
testAdapter,
|
|
25
|
-
(cb) => cb()
|
|
26
|
-
);
|
|
27
|
-
return instance;
|
|
28
|
-
} catch (e) {
|
|
29
|
-
console.error("[ERROR] Failed to create MockCore:", e);
|
|
30
|
-
throw e;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
WithCustomInput: (input: any) => {
|
|
34
|
-
return new MockCore(
|
|
35
|
-
input,
|
|
36
|
-
specification,
|
|
37
|
-
implementation,
|
|
38
|
-
{ ports: [] },
|
|
39
|
-
testAdapter,
|
|
40
|
-
(cb) => cb()
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
WithResourceRequirements: (requirements: ITTestResourceRequest) => {
|
|
44
|
-
return new MockCore(
|
|
45
|
-
{},
|
|
46
|
-
specification,
|
|
47
|
-
implementation,
|
|
48
|
-
requirements,
|
|
49
|
-
testAdapter,
|
|
50
|
-
(cb) => cb()
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
WithCustomAdapter: (customAdapter: Partial<ITestAdapter<any>>) => {
|
|
54
|
-
return new MockCore(
|
|
55
|
-
{},
|
|
56
|
-
specification,
|
|
57
|
-
implementation,
|
|
58
|
-
{ ports: [] },
|
|
59
|
-
{ ...testAdapter, ...customAdapter },
|
|
60
|
-
(cb) => cb()
|
|
61
|
-
);
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
whens: {
|
|
66
|
-
addArtifact: (artifact: Promise<any>) => (builder) => {
|
|
67
|
-
builder.artifacts.push(artifact);
|
|
68
|
-
return builder;
|
|
69
|
-
},
|
|
70
|
-
setTestJobs: (jobs: any[]) => (builder) => {
|
|
71
|
-
builder.testJobs = jobs;
|
|
72
|
-
return builder;
|
|
73
|
-
},
|
|
74
|
-
modifySpecs: (modifier: (specs: any[]) => any[]) => (builder) => {
|
|
75
|
-
console.log("Modifying specs - current count:", builder.specs?.length);
|
|
76
|
-
const newSpecs = modifier(builder.specs || []);
|
|
77
|
-
console.log("Modifying specs - new count:", newSpecs.length);
|
|
78
|
-
builder.specs = newSpecs;
|
|
79
|
-
return builder;
|
|
80
|
-
},
|
|
81
|
-
triggerError: (message: string) => (builder) => {
|
|
82
|
-
throw new Error(message);
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
thens: {
|
|
87
|
-
initializedProperly: () => (builder) => {
|
|
88
|
-
if (!builder) {
|
|
89
|
-
throw new Error("Builder is undefined");
|
|
90
|
-
}
|
|
91
|
-
if (!(builder instanceof MockCore)) {
|
|
92
|
-
throw new Error(
|
|
93
|
-
`Builder is not MockCore (got ${builder.constructor.name})`
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
if (!builder.testResourceRequirement) {
|
|
97
|
-
throw new Error("testResourceRequirement not set");
|
|
98
|
-
}
|
|
99
|
-
if (!builder.testAdapter) {
|
|
100
|
-
throw new Error("testAdapter not set");
|
|
101
|
-
}
|
|
102
|
-
return builder;
|
|
103
|
-
},
|
|
104
|
-
specsGenerated: () => (builder) => {
|
|
105
|
-
if (!Array.isArray(builder.specs)) {
|
|
106
|
-
throw new Error("Specs were not generated");
|
|
107
|
-
}
|
|
108
|
-
return builder;
|
|
109
|
-
},
|
|
110
|
-
jobsCreated: () => (builder) => {
|
|
111
|
-
if (!Array.isArray(builder.testJobs)) {
|
|
112
|
-
throw new Error("Test jobs were not created");
|
|
113
|
-
}
|
|
114
|
-
return builder;
|
|
115
|
-
},
|
|
116
|
-
artifactsTracked: () => (builder) => {
|
|
117
|
-
if (!Array.isArray(builder.artifacts)) {
|
|
118
|
-
throw new Error("Artifacts array not initialized");
|
|
119
|
-
}
|
|
120
|
-
return builder;
|
|
121
|
-
},
|
|
122
|
-
resourceRequirementsSet: () => (builder) => {
|
|
123
|
-
if (!builder.testResourceRequirement) {
|
|
124
|
-
throw new Error("Resource requirements not set");
|
|
125
|
-
}
|
|
126
|
-
return builder;
|
|
127
|
-
},
|
|
128
|
-
interfaceConfigured: () => (builder) => {
|
|
129
|
-
if (!builder.testAdapter) {
|
|
130
|
-
throw new Error("Test adapter not configured");
|
|
131
|
-
}
|
|
132
|
-
return builder;
|
|
133
|
-
},
|
|
134
|
-
errorThrown: (expectedMessage: string) => (builder) => {
|
|
135
|
-
// Handled by test runner
|
|
136
|
-
return builder;
|
|
137
|
-
},
|
|
138
|
-
testRunSuccessful: () => async (builder) => {
|
|
139
|
-
try {
|
|
140
|
-
await builder.receiveTestResourceConfig("");
|
|
141
|
-
return builder;
|
|
142
|
-
} catch (e) {
|
|
143
|
-
throw new Error(`Test run failed: ${e.message}`);
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
specsModified: (expectedCount: number) => (builder) => {
|
|
147
|
-
if (!builder.specs || builder.specs.length !== expectedCount) {
|
|
148
|
-
throw new Error(
|
|
149
|
-
`Expected ${expectedCount} specs, got ${builder.specs?.length}`
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
return builder;
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { ITestSpecification } from "../../CoreTypes";
|
|
2
|
-
import { I, O } from "./core.test.types";
|
|
3
|
-
|
|
4
|
-
export const specification: ITestSpecification<I, O> = (
|
|
5
|
-
Suite,
|
|
6
|
-
Given,
|
|
7
|
-
When,
|
|
8
|
-
Then
|
|
9
|
-
) => {
|
|
10
|
-
const summary = {
|
|
11
|
-
suites: {
|
|
12
|
-
'Testeranto Core Functionality': {
|
|
13
|
-
features: {},
|
|
14
|
-
artifacts: []
|
|
15
|
-
},
|
|
16
|
-
'Testeranto Advanced Features': {
|
|
17
|
-
features: {},
|
|
18
|
-
artifacts: []
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
features: {},
|
|
22
|
-
artifacts: []
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return [
|
|
26
|
-
Suite.Default(
|
|
27
|
-
"Testeranto Core Functionality",
|
|
28
|
-
summary.suites['Testeranto Core Functionality'],
|
|
29
|
-
{
|
|
30
|
-
// Initialization tests
|
|
31
|
-
defaultInitialization: Given.Default(
|
|
32
|
-
["Should initialize with default values"],
|
|
33
|
-
[],
|
|
34
|
-
[
|
|
35
|
-
Then.initializedProperly(),
|
|
36
|
-
Then.specsGenerated(),
|
|
37
|
-
Then.jobsCreated(),
|
|
38
|
-
Then.artifactsTracked()
|
|
39
|
-
]
|
|
40
|
-
),
|
|
41
|
-
customInputInitialization: Given.WithCustomInput(
|
|
42
|
-
{ test: "input" },
|
|
43
|
-
[],
|
|
44
|
-
[Then.initializedProperly()]
|
|
45
|
-
),
|
|
46
|
-
|
|
47
|
-
// Configuration tests
|
|
48
|
-
resourceConfig: Given.WithResourceRequirements(
|
|
49
|
-
{ ports: [3000, 3001] },
|
|
50
|
-
[],
|
|
51
|
-
[Then.resourceRequirementsSet()]
|
|
52
|
-
),
|
|
53
|
-
interfaceConfig: Given.WithCustomAdapter(
|
|
54
|
-
{
|
|
55
|
-
assertThis: (x) => !!x,
|
|
56
|
-
beforeEach: async (s, i) => i(),
|
|
57
|
-
},
|
|
58
|
-
[],
|
|
59
|
-
[Then.interfaceConfigured()]
|
|
60
|
-
),
|
|
61
|
-
|
|
62
|
-
// Core operations
|
|
63
|
-
specGeneration: Given.Default(
|
|
64
|
-
["Should generate test specs"],
|
|
65
|
-
[],
|
|
66
|
-
[Then.specsGenerated()]
|
|
67
|
-
),
|
|
68
|
-
jobCreation: Given.Default(
|
|
69
|
-
["Should create test jobs"],
|
|
70
|
-
[],
|
|
71
|
-
[Then.jobsCreated()]
|
|
72
|
-
),
|
|
73
|
-
artifactHandling: Given.Default(
|
|
74
|
-
["Should track artifacts"],
|
|
75
|
-
[When.addArtifact(Promise.resolve("test"))],
|
|
76
|
-
[Then.artifactsTracked()]
|
|
77
|
-
),
|
|
78
|
-
},
|
|
79
|
-
[]
|
|
80
|
-
),
|
|
81
|
-
|
|
82
|
-
Suite.ExtendedSuite("Testeranto Advanced Features", summary.suites['Testeranto Advanced Features'], {
|
|
83
|
-
// Error handling
|
|
84
|
-
errorPropagation: Given.Default(
|
|
85
|
-
["Should propagate errors properly"],
|
|
86
|
-
[When.triggerError("test error")],
|
|
87
|
-
[Then.errorThrown("test error")]
|
|
88
|
-
),
|
|
89
|
-
|
|
90
|
-
// Dynamic behavior
|
|
91
|
-
specModification: Given.Default(
|
|
92
|
-
["Should allow spec modification"],
|
|
93
|
-
[When.modifySpecs((specs) => [...specs, { name: "extra" }])],
|
|
94
|
-
[Then.specsModified(1)]
|
|
95
|
-
),
|
|
96
|
-
|
|
97
|
-
// Full lifecycle
|
|
98
|
-
testExecution: Given.Default(
|
|
99
|
-
["Should execute full test lifecycle"],
|
|
100
|
-
[],
|
|
101
|
-
[Then.testRunSuccessful()]
|
|
102
|
-
),
|
|
103
|
-
|
|
104
|
-
// Custom implementations
|
|
105
|
-
// Removed customImpl test since WithCustomImplementation isn't defined
|
|
106
|
-
dynamicSpecs: Given.Default(
|
|
107
|
-
["Should handle dynamic spec changes"],
|
|
108
|
-
[When.modifySpecs((specs) => specs)],
|
|
109
|
-
[Then.specsGenerated()]
|
|
110
|
-
),
|
|
111
|
-
}),
|
|
112
|
-
];
|
|
113
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import Testeranto from "../../Pure";
|
|
2
|
-
import { specification } from "./core.test.specification";
|
|
3
|
-
import { implementation } from "./core.test.implementation";
|
|
4
|
-
import { testAdapter } from "./core.test.adapter";
|
|
5
|
-
import { I, O, M } from "./core.test.types";
|
|
6
|
-
import { MockCore } from "./MockCore";
|
|
7
|
-
|
|
8
|
-
export default Testeranto<I, O, M>(
|
|
9
|
-
MockCore.prototype,
|
|
10
|
-
specification,
|
|
11
|
-
implementation,
|
|
12
|
-
testAdapter
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
// console.log("[DEBUG] Starting core.test.ts");
|
|
16
|
-
// console.log("[DEBUG] MockCore:", MockCore?.name);
|
|
17
|
-
// console.log("[DEBUG] specification:", specification?.name);
|
|
18
|
-
// console.log("[DEBUG] implementation keys:", Object.keys(implementation));
|
|
19
|
-
// console.log("[DEBUG] testAdapter keys:", Object.keys(testAdapter));
|
|
20
|
-
|
|
21
|
-
// console.log("[DEBUG] Starting test runner with:");
|
|
22
|
-
// console.log("- Specification:", specification?.name);
|
|
23
|
-
// console.log("- Implementation keys:", Object.keys(implementation));
|
|
24
|
-
// console.log("- Test adapter keys:", Object.keys(testAdapter));
|
|
25
|
-
|
|
26
|
-
// console.log("[DEBUG] Creating test runner instance...");
|
|
27
|
-
// try {
|
|
28
|
-
// const testRunner = new Testeranto<I, O, M>(
|
|
29
|
-
// MockCore.prototype,
|
|
30
|
-
// specification,
|
|
31
|
-
// implementation,
|
|
32
|
-
// { ports: [3000, 3001] },
|
|
33
|
-
// testAdapter
|
|
34
|
-
// );
|
|
35
|
-
|
|
36
|
-
// console.log("[DEBUG] Starting test execution...");
|
|
37
|
-
// const runTests = async () => {
|
|
38
|
-
// try {
|
|
39
|
-
// const result = await testRunner.receiveTestResourceConfig(
|
|
40
|
-
// JSON.stringify({
|
|
41
|
-
// name: "core.test",
|
|
42
|
-
// fs: "/tmp/core.test",
|
|
43
|
-
// ports: [3000, 3001],
|
|
44
|
-
// })
|
|
45
|
-
// );
|
|
46
|
-
|
|
47
|
-
// console.log("[DEBUG] Test run completed with:");
|
|
48
|
-
// console.log("- Status:", result.failed ? "FAILED" : "PASSED");
|
|
49
|
-
// console.log("- Failures:", result.fails);
|
|
50
|
-
// console.log("- Features tested:", result.features?.length);
|
|
51
|
-
// console.log("- Artifacts:", result.artifacts?.length);
|
|
52
|
-
|
|
53
|
-
// if (result.failed) {
|
|
54
|
-
// throw new Error(`Tests failed with ${result.fails} failures`);
|
|
55
|
-
// }
|
|
56
|
-
// return result;
|
|
57
|
-
// } catch (e) {
|
|
58
|
-
// console.error("[ERROR] Test runner failed:", e.message);
|
|
59
|
-
// console.error("- Full error:", e);
|
|
60
|
-
// process.exit(1);
|
|
61
|
-
// }
|
|
62
|
-
// };
|
|
63
|
-
|
|
64
|
-
// // Run tests immediately when imported
|
|
65
|
-
// runTests().catch(e => {
|
|
66
|
-
// console.error("[ERROR] Test runner failed:", e);
|
|
67
|
-
// process.exit(1);
|
|
68
|
-
// });
|
|
69
|
-
// } catch (e) {
|
|
70
|
-
// console.error("[ERROR] Failed to initialize test runner:", e);
|
|
71
|
-
// process.exit(1);
|
|
72
|
-
// }
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Ibdd_in, Ibdd_out, ITestAdapter } from "../../CoreTypes";
|
|
2
|
-
import { MockCore } from "./MockCore";
|
|
3
|
-
import { ITTestResourceRequest } from "..";
|
|
4
|
-
|
|
5
|
-
export type I = Ibdd_in<
|
|
6
|
-
{}, // iinput
|
|
7
|
-
MockCore<any, any, any>, // isubject
|
|
8
|
-
MockCore<any, any, any>, // istore
|
|
9
|
-
MockCore<any, any, any>, // iselection
|
|
10
|
-
() => MockCore<any, any, any>, // given
|
|
11
|
-
(store: any) => any, // when
|
|
12
|
-
(store: any) => any // then
|
|
13
|
-
>;
|
|
14
|
-
|
|
15
|
-
export type O = Ibdd_out<
|
|
16
|
-
// Suites
|
|
17
|
-
{
|
|
18
|
-
Default: [string];
|
|
19
|
-
ExtendedSuite: [description: string];
|
|
20
|
-
},
|
|
21
|
-
// Givens
|
|
22
|
-
{
|
|
23
|
-
Default: [];
|
|
24
|
-
WithCustomInput: [input: any];
|
|
25
|
-
WithResourceRequirements: [requirements: ITTestResourceRequest];
|
|
26
|
-
WithCustomAdapter: [adapter: Partial<ITestAdapter<any>>];
|
|
27
|
-
},
|
|
28
|
-
// Whens
|
|
29
|
-
{
|
|
30
|
-
addArtifact: [artifact: Promise<any>];
|
|
31
|
-
setTestJobs: [jobs: any[]];
|
|
32
|
-
modifySpecs: [modifier: (specs: any[]) => any[]];
|
|
33
|
-
triggerError: [message: string];
|
|
34
|
-
},
|
|
35
|
-
// Thens
|
|
36
|
-
{
|
|
37
|
-
initializedProperly: [];
|
|
38
|
-
specsGenerated: [];
|
|
39
|
-
jobsCreated: [];
|
|
40
|
-
artifactsTracked: [];
|
|
41
|
-
resourceRequirementsSet: [];
|
|
42
|
-
interfaceConfigured: [];
|
|
43
|
-
errorThrown: [expectedMessage: string];
|
|
44
|
-
testRunSuccessful: [];
|
|
45
|
-
},
|
|
46
|
-
// Checks
|
|
47
|
-
{
|
|
48
|
-
Default: [];
|
|
49
|
-
}
|
|
50
|
-
>;
|
|
51
|
-
|
|
52
|
-
export type M = {
|
|
53
|
-
givens: {
|
|
54
|
-
[K in keyof O["givens"]]: (
|
|
55
|
-
...args: O["givens"][K]
|
|
56
|
-
) => MockCore<any, any, any>;
|
|
57
|
-
};
|
|
58
|
-
whens: {
|
|
59
|
-
[K in keyof O["whens"]]: (
|
|
60
|
-
...args: O["whens"][K]
|
|
61
|
-
) => (builder: MockCore<any, any, any>) => MockCore<any, any, any>;
|
|
62
|
-
};
|
|
63
|
-
thens: {
|
|
64
|
-
[K in keyof O["thens"]]: (
|
|
65
|
-
...args: O["thens"][K]
|
|
66
|
-
) => (builder: MockCore<any, any, any>) => MockCore<any, any, any>;
|
|
67
|
-
};
|
|
68
|
-
};
|
package/src/lib/core.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
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 {
|
|
7
|
-
Ibdd_in_any,
|
|
8
|
-
Ibdd_out_any,
|
|
9
|
-
ITestImplementation,
|
|
10
|
-
ITestAdapter,
|
|
11
|
-
ITestSpecification,
|
|
12
|
-
} from "../CoreTypes";
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
DefaultAdapter,
|
|
16
|
-
IFinalResults,
|
|
17
|
-
ITTestResourceConfiguration,
|
|
18
|
-
ITTestResourceRequest,
|
|
19
|
-
ITestArtifactory,
|
|
20
|
-
defaultTestResourceRequirement,
|
|
21
|
-
} from "./index.js";
|
|
22
|
-
import { BaseGiven, BaseWhen, BaseThen } from "./abstractBase.js";
|
|
23
|
-
import { ClassBuilder } from "./classBuilder.js";
|
|
24
|
-
import { IPM } from "./types";
|
|
25
|
-
import { BaseSuite } from "./BaseSuite.js";
|
|
26
|
-
|
|
27
|
-
export default abstract class TesterantoCore<
|
|
28
|
-
I extends Ibdd_in_any,
|
|
29
|
-
O extends Ibdd_out_any,
|
|
30
|
-
M
|
|
31
|
-
> extends ClassBuilder<I, O, M> {
|
|
32
|
-
constructor(
|
|
33
|
-
input: I["iinput"],
|
|
34
|
-
testSpecification: ITestSpecification<I, O>,
|
|
35
|
-
testImplementation: ITestImplementation<I, O, M> & {
|
|
36
|
-
suites: Record<string, any>;
|
|
37
|
-
givens: Record<string, any>;
|
|
38
|
-
whens: Record<string, any>;
|
|
39
|
-
thens: Record<string, any>;
|
|
40
|
-
},
|
|
41
|
-
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
|
|
42
|
-
testAdapter: Partial<ITestAdapter<I>>,
|
|
43
|
-
uberCatcher: (cb: () => void) => void
|
|
44
|
-
) {
|
|
45
|
-
const fullAdapter = DefaultAdapter<I>(testAdapter);
|
|
46
|
-
|
|
47
|
-
super(
|
|
48
|
-
testImplementation,
|
|
49
|
-
testSpecification,
|
|
50
|
-
input,
|
|
51
|
-
|
|
52
|
-
class extends BaseSuite<I, O> {
|
|
53
|
-
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: IPM) {
|
|
54
|
-
return fullAdapter.afterAll(store, pm);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
assertThat(t: Awaited<I["then"]>): boolean {
|
|
58
|
-
return fullAdapter.assertThis(t);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async setup(
|
|
62
|
-
s: I["iinput"],
|
|
63
|
-
artifactory: ITestArtifactory,
|
|
64
|
-
tr: ITTestResourceConfiguration,
|
|
65
|
-
pm: IPM
|
|
66
|
-
): Promise<I["isubject"]> {
|
|
67
|
-
return fullAdapter.beforeAll?.(s, tr, pm) ?? (s as unknown as Promise<I["isubject"]>);
|
|
68
|
-
}
|
|
69
|
-
} as any,
|
|
70
|
-
|
|
71
|
-
class Given extends BaseGiven<I> {
|
|
72
|
-
uberCatcher = uberCatcher;
|
|
73
|
-
|
|
74
|
-
async givenThat(
|
|
75
|
-
subject,
|
|
76
|
-
testResource,
|
|
77
|
-
artifactory,
|
|
78
|
-
initializer,
|
|
79
|
-
initialValues,
|
|
80
|
-
pm
|
|
81
|
-
) {
|
|
82
|
-
return fullAdapter.beforeEach(
|
|
83
|
-
subject,
|
|
84
|
-
initializer,
|
|
85
|
-
testResource,
|
|
86
|
-
initialValues,
|
|
87
|
-
pm
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
afterEach(
|
|
92
|
-
store: I["istore"],
|
|
93
|
-
key: string,
|
|
94
|
-
artifactory,
|
|
95
|
-
pm
|
|
96
|
-
): Promise<unknown> {
|
|
97
|
-
return Promise.resolve(fullAdapter.afterEach(store, key, pm));
|
|
98
|
-
}
|
|
99
|
-
} as any,
|
|
100
|
-
|
|
101
|
-
class When extends BaseWhen<I> {
|
|
102
|
-
async andWhen(store, whenCB, testResource, pm) {
|
|
103
|
-
return await fullAdapter.andWhen(store, whenCB, testResource, pm);
|
|
104
|
-
}
|
|
105
|
-
} as any,
|
|
106
|
-
|
|
107
|
-
class Then extends BaseThen<I> {
|
|
108
|
-
async butThen(
|
|
109
|
-
store: any,
|
|
110
|
-
thenCB,
|
|
111
|
-
testResource: any,
|
|
112
|
-
pm: IPM
|
|
113
|
-
): Promise<I["iselection"]> {
|
|
114
|
-
return await fullAdapter.butThen(store, thenCB, testResource, pm);
|
|
115
|
-
}
|
|
116
|
-
} as any,
|
|
117
|
-
|
|
118
|
-
testResourceRequirement
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
abstract receiveTestResourceConfig(
|
|
123
|
-
partialTestResource: string
|
|
124
|
-
): Promise<IFinalResults>;
|
|
125
|
-
}
|