testeranto 0.197.0 → 0.199.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 +14 -14
- 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
|
@@ -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>>;
|
|
@@ -0,0 +1,91 @@
|
|
|
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 } from ".";
|
|
9
|
+
import { IPM } from "./types.js";
|
|
10
|
+
import { andWhenProxy } from "./pmProxy.js";
|
|
11
|
+
|
|
12
|
+
export abstract class BaseWhen<I extends Ibdd_in_any> {
|
|
13
|
+
public name: string;
|
|
14
|
+
whenCB: (x: I["iselection"]) => I["then"];
|
|
15
|
+
error: Error;
|
|
16
|
+
artifacts: string[] = [];
|
|
17
|
+
|
|
18
|
+
addArtifact(path: string) {
|
|
19
|
+
const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
|
|
20
|
+
this.artifacts.push(normalizedPath);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]) {
|
|
24
|
+
this.name = name;
|
|
25
|
+
this.whenCB = whenCB;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
abstract andWhen(
|
|
29
|
+
store: I["istore"],
|
|
30
|
+
whenCB: (x: I["iselection"]) => I["then"],
|
|
31
|
+
testResource,
|
|
32
|
+
pm: IPM
|
|
33
|
+
): Promise<any>;
|
|
34
|
+
|
|
35
|
+
toObj() {
|
|
36
|
+
const obj = {
|
|
37
|
+
name: this.name,
|
|
38
|
+
error: this.error
|
|
39
|
+
? `${this.error.name}: ${this.error.message}\n${this.error.stack}`
|
|
40
|
+
: null,
|
|
41
|
+
artifacts: this.artifacts || [],
|
|
42
|
+
};
|
|
43
|
+
console.log(
|
|
44
|
+
`[TOOBJ] Serializing ${this.constructor.name} with artifacts:`,
|
|
45
|
+
obj.artifacts
|
|
46
|
+
);
|
|
47
|
+
return obj;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async test(
|
|
51
|
+
store: I["istore"],
|
|
52
|
+
testResourceConfiguration,
|
|
53
|
+
tLog: ITLog,
|
|
54
|
+
pm: IPM,
|
|
55
|
+
filepath: string
|
|
56
|
+
) {
|
|
57
|
+
try {
|
|
58
|
+
// tLog(" When:", this.name);
|
|
59
|
+
// Ensure addArtifact is properly bound to 'this'
|
|
60
|
+
const addArtifact = this.addArtifact.bind(this);
|
|
61
|
+
const proxiedPm = andWhenProxy(pm, filepath, addArtifact);
|
|
62
|
+
|
|
63
|
+
// (proxiedPm as any).currentStep = this;
|
|
64
|
+
const result = await this.andWhen(
|
|
65
|
+
store,
|
|
66
|
+
this.whenCB,
|
|
67
|
+
testResourceConfiguration,
|
|
68
|
+
proxiedPm
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return result;
|
|
72
|
+
} catch (e: any) {
|
|
73
|
+
console.error(
|
|
74
|
+
"[ERROR] When step failed:",
|
|
75
|
+
this.name.toString(),
|
|
76
|
+
e.toString()
|
|
77
|
+
);
|
|
78
|
+
this.error = e;
|
|
79
|
+
throw e;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Represents a collection of When actions keyed by their names.
|
|
85
|
+
* Whens are typically part of Given definitions rather than standalone collections,
|
|
86
|
+
* but this type exists for consistency and potential future use cases where:
|
|
87
|
+
* - When actions might need to be reused across multiple Given conditions
|
|
88
|
+
* - Dynamic composition of test steps is required
|
|
89
|
+
* - Advanced test patterns need to reference When actions by name
|
|
90
|
+
*/
|
|
91
|
+
export type IWhens<I extends Ibdd_in_any> = Record<string, BaseWhen<I>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import
|
|
3
|
+
import Tiposkripto from "../Tiposkripto";
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
Ibdd_in_any,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
import { ITTestResourceRequest, IFinalResults } from "..";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Concrete implementation of
|
|
15
|
+
* Concrete implementation of Tiposkripto for testing purposes
|
|
16
16
|
*/
|
|
17
|
-
export class
|
|
17
|
+
export class MockTiposkripto<
|
|
18
18
|
I extends Ibdd_in_any,
|
|
19
19
|
O extends Ibdd_out_any,
|
|
20
20
|
M = unknown
|
|
21
|
-
> extends
|
|
21
|
+
> extends Tiposkripto<I, O, M> {
|
|
22
22
|
public specs: any[] = [];
|
|
23
23
|
public testJobs: any[] = [];
|
|
24
24
|
public artifacts: any[] = [];
|
|
@@ -41,8 +41,6 @@ export class MockCore<
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
// this.testResourceRequirement = testResourceRequirement;
|
|
45
|
-
// this.testAdapter = testAdapter;
|
|
46
44
|
super(
|
|
47
45
|
input,
|
|
48
46
|
testSpecification,
|
|
@@ -60,7 +58,6 @@ export class MockCore<
|
|
|
60
58
|
failed: false,
|
|
61
59
|
fails: 0,
|
|
62
60
|
artifacts: [],
|
|
63
|
-
// logPromise: Promise.resolve(),
|
|
64
61
|
features: [],
|
|
65
62
|
};
|
|
66
63
|
}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
|
|
3
4
|
import { ITestAdapter } from "../../CoreTypes";
|
|
4
|
-
|
|
5
|
-
import {
|
|
5
|
+
|
|
6
|
+
import { I } from "./Tiposkripto.types";
|
|
7
|
+
import { MockTiposkripto } from "./MockTiposkripto";
|
|
6
8
|
|
|
7
9
|
export const testAdapter: ITestAdapter<I> = {
|
|
10
|
+
beforeAll: async (input, testResource, pm) => input as any,
|
|
8
11
|
beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
|
|
9
12
|
try {
|
|
10
13
|
const result = await initializer();
|
|
11
14
|
if (!result) {
|
|
12
15
|
throw new Error("Initializer returned undefined");
|
|
13
16
|
}
|
|
14
|
-
if (!(result instanceof
|
|
17
|
+
if (!(result instanceof MockTiposkripto)) {
|
|
15
18
|
throw new Error(
|
|
16
|
-
`Initializer returned ${result?.constructor?.name}, expected
|
|
19
|
+
`Initializer returned ${result?.constructor?.name}, expected MockTiposkripto`
|
|
17
20
|
);
|
|
18
21
|
}
|
|
19
|
-
|
|
20
22
|
return result;
|
|
21
23
|
} catch (e) {
|
|
22
24
|
console.error("[ERROR] BeforeEach failed:", e);
|
|
23
25
|
throw e;
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
|
-
andWhen: async (store, whenCB, testResource,
|
|
27
|
-
return whenCB(store,
|
|
28
|
+
andWhen: async (store, whenCB, testResource, utils) => {
|
|
29
|
+
return whenCB(store, utils);
|
|
28
30
|
},
|
|
29
31
|
butThen: async (store, thenCB, testResource, pm) => {
|
|
30
32
|
return thenCB(store, pm);
|
|
31
33
|
},
|
|
32
34
|
afterEach: (store) => store,
|
|
33
|
-
afterAll: (
|
|
34
|
-
assertThis: (
|
|
35
|
-
beforeAll: async (input, testResource, pm) => input as any,
|
|
35
|
+
afterAll: () => {},
|
|
36
|
+
assertThis: (x: any) => !!x,
|
|
36
37
|
};
|
|
@@ -2,92 +2,89 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
import { PassThrough } from "stream";
|
|
4
4
|
|
|
5
|
-
import { ITestImplementation, ITestSpecification } from "../../CoreTypes";
|
|
6
|
-
import
|
|
7
|
-
import { TestClassBuilder } from "../classBuilder";
|
|
5
|
+
import { ITestImplementation, ITestSpecification, ITestAdapter } from "../../CoreTypes";
|
|
6
|
+
import { MockTiposkripto } from "./MockTiposkripto";
|
|
8
7
|
|
|
9
|
-
import { I, O, M } from "./
|
|
8
|
+
import { I, O, M } from "./Tiposkripto.types";
|
|
10
9
|
|
|
11
10
|
import { ITTestResourceRequest } from "..";
|
|
12
|
-
import { specification } from "./
|
|
13
|
-
import {
|
|
11
|
+
import { specification } from "./Tiposkripto.specification";
|
|
12
|
+
import { testAdapter } from "./Tiposkripto.adapter";
|
|
14
13
|
|
|
15
14
|
export const implementation: ITestImplementation<I, O, M> = {
|
|
16
15
|
suites: {
|
|
17
|
-
Default: "
|
|
18
|
-
ExtendedSuite: "Extended
|
|
16
|
+
Default: "Tiposkripto test suite",
|
|
17
|
+
ExtendedSuite: "Extended Tiposkripto test suite",
|
|
19
18
|
},
|
|
20
|
-
|
|
21
19
|
givens: {
|
|
22
20
|
Default: () => {
|
|
23
21
|
console.log("Creating default test builder instance");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
// Use a function to defer the implementation reference
|
|
23
|
+
const createBuilder = (impl: ITestImplementation<any, any, any>) => {
|
|
24
|
+
return new MockTiposkripto(
|
|
25
|
+
{}, // input
|
|
26
|
+
specification, // Use the current specification
|
|
27
|
+
impl, // Use the passed implementation
|
|
28
|
+
{ ports: [] }, // Default resource requirements
|
|
29
|
+
testAdapter, // Default adapter
|
|
30
|
+
(cb) => cb() // Default uberCatcher
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
const builder = createBuilder(implementation);
|
|
34
34
|
console.log("Builder created:", builder);
|
|
35
35
|
return builder;
|
|
36
36
|
},
|
|
37
37
|
WithCustomInput: (input: any) => {
|
|
38
|
-
return new
|
|
39
|
-
implementation,
|
|
40
|
-
specification,
|
|
38
|
+
return new MockTiposkripto(
|
|
41
39
|
input,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{ ports: [] }
|
|
40
|
+
specification,
|
|
41
|
+
implementation,
|
|
42
|
+
{ ports: [] },
|
|
43
|
+
testAdapter,
|
|
44
|
+
(cb) => cb()
|
|
48
45
|
);
|
|
49
46
|
},
|
|
50
47
|
WithResourceRequirements: (requirements: ITTestResourceRequest) => {
|
|
51
|
-
return new
|
|
52
|
-
implementation,
|
|
53
|
-
specification,
|
|
48
|
+
return new MockTiposkripto(
|
|
54
49
|
{},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
requirements
|
|
50
|
+
specification,
|
|
51
|
+
implementation,
|
|
52
|
+
requirements,
|
|
53
|
+
testAdapter,
|
|
54
|
+
(cb) => cb()
|
|
61
55
|
);
|
|
62
56
|
},
|
|
63
57
|
WithCustomImplementation: (impl: ITestImplementation<any, any>) => {
|
|
64
|
-
return new
|
|
65
|
-
impl,
|
|
66
|
-
specification,
|
|
58
|
+
return new MockTiposkripto(
|
|
67
59
|
{},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{ ports: [] }
|
|
60
|
+
specification,
|
|
61
|
+
impl,
|
|
62
|
+
{ ports: [] },
|
|
63
|
+
testAdapter,
|
|
64
|
+
(cb) => cb()
|
|
74
65
|
);
|
|
75
66
|
},
|
|
76
67
|
WithCustomSpecification: (spec: ITestSpecification<any, any>) => {
|
|
77
|
-
return new
|
|
78
|
-
|
|
68
|
+
return new MockTiposkripto(
|
|
69
|
+
{},
|
|
79
70
|
spec,
|
|
71
|
+
implementation,
|
|
72
|
+
{ ports: [] },
|
|
73
|
+
testAdapter,
|
|
74
|
+
(cb) => cb()
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
WithCustomAdapter: (customAdapter: Partial<ITestAdapter<any>>) => {
|
|
78
|
+
return new MockTiposkripto(
|
|
80
79
|
{},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{ ports: [] }
|
|
80
|
+
specification,
|
|
81
|
+
implementation,
|
|
82
|
+
{ ports: [] },
|
|
83
|
+
{ ...testAdapter, ...customAdapter },
|
|
84
|
+
(cb) => cb()
|
|
87
85
|
);
|
|
88
86
|
},
|
|
89
87
|
},
|
|
90
|
-
|
|
91
88
|
whens: {
|
|
92
89
|
addArtifact: (artifact: Promise<any>) => (builder) => {
|
|
93
90
|
builder.artifacts.push(artifact);
|
|
@@ -109,43 +106,43 @@ export const implementation: ITestImplementation<I, O, M> = {
|
|
|
109
106
|
throw new Error(message);
|
|
110
107
|
},
|
|
111
108
|
},
|
|
112
|
-
|
|
113
109
|
thens: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
isMock: builder instanceof mock,
|
|
118
|
-
constructor: builder?.constructor?.name,
|
|
119
|
-
props: Object.keys(builder)
|
|
120
|
-
});
|
|
121
|
-
|
|
110
|
+
"it is initialized": () => (builder: any, utils: any) => {
|
|
111
|
+
utils.writeFileSync("hello.txt", "world");
|
|
112
|
+
|
|
122
113
|
if (!builder) {
|
|
123
114
|
throw new Error("Builder is undefined");
|
|
124
115
|
}
|
|
125
|
-
if (!(builder instanceof
|
|
116
|
+
if (!(builder instanceof MockTiposkripto)) {
|
|
126
117
|
throw new Error(
|
|
127
|
-
`Builder was not properly initialized. Expected
|
|
118
|
+
`Builder was not properly initialized. Expected MockTiposkripto instance but got ${builder?.constructor?.name}`
|
|
128
119
|
);
|
|
129
120
|
}
|
|
130
|
-
|
|
121
|
+
|
|
131
122
|
// Verify required properties exist
|
|
132
|
-
const requiredProps = [
|
|
123
|
+
const requiredProps = [
|
|
124
|
+
"specs",
|
|
125
|
+
"testJobs",
|
|
126
|
+
"artifacts",
|
|
127
|
+
"suitesOverrides",
|
|
128
|
+
"givenOverides",
|
|
129
|
+
"whenOverides",
|
|
130
|
+
"thenOverides",
|
|
131
|
+
];
|
|
133
132
|
for (const prop of requiredProps) {
|
|
134
133
|
if (!(prop in builder)) {
|
|
135
134
|
throw new Error(`Missing required property: ${prop}`);
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
|
-
|
|
137
|
+
|
|
139
138
|
return builder;
|
|
140
139
|
},
|
|
141
|
-
|
|
142
140
|
specsGenerated: () => (builder) => {
|
|
143
141
|
if (!Array.isArray(builder.specs)) {
|
|
144
142
|
throw new Error("Specs were not generated");
|
|
145
143
|
}
|
|
146
144
|
return builder;
|
|
147
145
|
},
|
|
148
|
-
|
|
149
146
|
jobsCreated: () => (builder) => {
|
|
150
147
|
if (!Array.isArray(builder.testJobs)) {
|
|
151
148
|
throw new Error("Test jobs were not created");
|
|
@@ -188,6 +185,12 @@ export const implementation: ITestImplementation<I, O, M> = {
|
|
|
188
185
|
}
|
|
189
186
|
return builder;
|
|
190
187
|
},
|
|
188
|
+
interfaceConfigured: () => (builder) => {
|
|
189
|
+
if (!builder.testAdapter) {
|
|
190
|
+
throw new Error("Test adapter not configured");
|
|
191
|
+
}
|
|
192
|
+
return builder;
|
|
193
|
+
},
|
|
191
194
|
specsModified: (expectedCount: number) => (builder) => {
|
|
192
195
|
if (builder.specs.length <= expectedCount) {
|
|
193
196
|
throw new Error(`Expected at least ${expectedCount} modified specs`);
|
|
@@ -206,13 +209,7 @@ export const implementation: ITestImplementation<I, O, M> = {
|
|
|
206
209
|
},
|
|
207
210
|
testRunSuccessful: () => async (builder) => {
|
|
208
211
|
try {
|
|
209
|
-
await builder.
|
|
210
|
-
testResourceConfiguration: {
|
|
211
|
-
name: "test",
|
|
212
|
-
fs: "/tmp",
|
|
213
|
-
ports: [],
|
|
214
|
-
},
|
|
215
|
-
});
|
|
212
|
+
await builder.receiveTestResourceConfig("");
|
|
216
213
|
return builder;
|
|
217
214
|
} catch (e) {
|
|
218
215
|
throw new Error(`Test run failed: ${e.message}`);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ITestSpecification } from "../../CoreTypes";
|
|
2
|
+
|
|
3
|
+
import { I, O } from "./Tiposkripto.types";
|
|
4
|
+
import { implementation } from "./Tiposkripto.implementation";
|
|
5
|
+
|
|
6
|
+
export const specification: ITestSpecification<I, O> = (
|
|
7
|
+
Suite,
|
|
8
|
+
Given,
|
|
9
|
+
When,
|
|
10
|
+
Then
|
|
11
|
+
) => {
|
|
12
|
+
return [
|
|
13
|
+
Suite.Default("Tiposkripto Core Functionality", {
|
|
14
|
+
// Basic initialization tests
|
|
15
|
+
initialization: Given.Default(
|
|
16
|
+
["Tiposkripto should initialize with default values"],
|
|
17
|
+
[],
|
|
18
|
+
[Then.initializedProperly()]
|
|
19
|
+
),
|
|
20
|
+
customInput: Given.WithCustomInput(
|
|
21
|
+
{ custom: "input" },
|
|
22
|
+
[],
|
|
23
|
+
[Then.initializedProperly()]
|
|
24
|
+
),
|
|
25
|
+
resourceRequirements: Given.WithResourceRequirements(
|
|
26
|
+
{ ports: [3000, 3001] },
|
|
27
|
+
[],
|
|
28
|
+
[Then.resourceRequirementsSet()]
|
|
29
|
+
),
|
|
30
|
+
|
|
31
|
+
// Core functionality tests
|
|
32
|
+
specGeneration: Given.Default(
|
|
33
|
+
["Should generate specs from test specification"],
|
|
34
|
+
[],
|
|
35
|
+
[Then.specsGenerated()]
|
|
36
|
+
),
|
|
37
|
+
jobCreation: Given.Default(
|
|
38
|
+
["Should create test jobs from specs"],
|
|
39
|
+
[],
|
|
40
|
+
[Then.jobsCreated()]
|
|
41
|
+
),
|
|
42
|
+
artifactTracking: Given.Default(
|
|
43
|
+
["Should track artifacts"],
|
|
44
|
+
[When.addArtifact(Promise.resolve("test"))],
|
|
45
|
+
[Then.artifactsTracked()]
|
|
46
|
+
),
|
|
47
|
+
|
|
48
|
+
// Configuration tests
|
|
49
|
+
overridesConfiguration: Given.Default(
|
|
50
|
+
["Should properly configure all overrides"],
|
|
51
|
+
[],
|
|
52
|
+
[
|
|
53
|
+
Then.suitesOverridesConfigured(),
|
|
54
|
+
Then.givensOverridesConfigured(),
|
|
55
|
+
Then.whensOverridesConfigured(),
|
|
56
|
+
Then.thensOverridesConfigured(),
|
|
57
|
+
]
|
|
58
|
+
),
|
|
59
|
+
interfaceConfiguration: Given.WithCustomAdapter(
|
|
60
|
+
{
|
|
61
|
+
assertThis: (x) => !!x,
|
|
62
|
+
beforeEach: async (s, i) => i(),
|
|
63
|
+
},
|
|
64
|
+
[],
|
|
65
|
+
[Then.interfaceConfigured()]
|
|
66
|
+
),
|
|
67
|
+
}),
|
|
68
|
+
|
|
69
|
+
Suite.ExtendedSuite("Tiposkripto Advanced Features", {
|
|
70
|
+
// Custom implementations
|
|
71
|
+
customImplementation: Given.WithCustomImplementation(
|
|
72
|
+
implementation,
|
|
73
|
+
[],
|
|
74
|
+
[Then.specsGenerated(), Then.jobsCreated()]
|
|
75
|
+
),
|
|
76
|
+
customSpecification: Given.WithCustomSpecification(
|
|
77
|
+
specification,
|
|
78
|
+
[],
|
|
79
|
+
[Then.specsGenerated(), Then.jobsCreated()]
|
|
80
|
+
),
|
|
81
|
+
|
|
82
|
+
// Dynamic modification tests
|
|
83
|
+
specModification: Given.Default(
|
|
84
|
+
["Should allow modifying specs"],
|
|
85
|
+
[When.modifySpecs((specs) => [...specs, "extra"])],
|
|
86
|
+
[Then.specsModified(1)]
|
|
87
|
+
),
|
|
88
|
+
jobModification: Given.Default(
|
|
89
|
+
["Should allow modifying jobs"],
|
|
90
|
+
[When.modifyJobs((jobs) => [...jobs, {} as ITestJob])],
|
|
91
|
+
[Then.jobsModified(1)]
|
|
92
|
+
),
|
|
93
|
+
|
|
94
|
+
// Error handling
|
|
95
|
+
errorHandling: Given.Default(
|
|
96
|
+
["Should properly handle errors"],
|
|
97
|
+
[When.triggerError("test error")],
|
|
98
|
+
[Then.errorThrown("test error")]
|
|
99
|
+
),
|
|
100
|
+
|
|
101
|
+
// Full test run
|
|
102
|
+
fullTestRun: Given.Default(
|
|
103
|
+
["Should complete a full test run successfully"],
|
|
104
|
+
[],
|
|
105
|
+
[Then.testRunSuccessful()]
|
|
106
|
+
),
|
|
107
|
+
}),
|
|
108
|
+
];
|
|
109
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Testeranto from "../../Node";
|
|
2
|
+
|
|
3
|
+
import { testAdapter } from "./Tiposkripto.adapter";
|
|
4
|
+
import { I, O, M } from "./Tiposkripto.types";
|
|
5
|
+
import { MockTiposkripto } from "./MockTiposkripto";
|
|
6
|
+
import { specification } from "./Tiposkripto.specification";
|
|
7
|
+
import { implementation } from "./Tiposkripto.implementation";
|
|
8
|
+
|
|
9
|
+
export default Testeranto<I, O, M>(
|
|
10
|
+
MockTiposkripto.prototype,
|
|
11
|
+
specification,
|
|
12
|
+
implementation,
|
|
13
|
+
testAdapter,
|
|
14
|
+
{ ports: 1 }
|
|
15
|
+
);
|