testeranto 0.135.0 → 0.140.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aider.chat.history.md +13976 -0
- package/.aider.input.history +530 -0
- package/.aider.tags.cache.v3/{d8/b0/a8966fcd65890fd9f70d7afe8141.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{8e/ec/2d4659a1589a0187a757ab1cbefa.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -135
- package/bundle.js +1 -1
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -73
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/lib/abstractBase.js +2 -0
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/core.js +2 -0
- package/dist/common/src/run.js +1 -1
- package/dist/common/src/utils/buildTemplates.js +88 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +4 -1
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/Project.js +41 -47
- package/dist/module/src/TestReport.js +34 -31
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/build.js +7 -73
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/lib/abstractBase.js +2 -0
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/core.js +2 -0
- package/dist/module/src/run.js +1 -1
- package/dist/module/src/utils/buildTemplates.js +82 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +62 -13
- package/dist/prebuild/TestReport.js +39 -18
- package/dist/prebuild/build.mjs +96 -73
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +5 -3
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
- package/dist/types/src/Pure.d.ts +3 -3
- package/dist/types/src/Types.d.ts +18 -14
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +8 -8
- package/dist/types/src/lib/basebuilder.d.ts +3 -3
- package/dist/types/src/lib/classBuilder.d.ts +2 -2
- package/dist/types/src/lib/core.d.ts +2 -2
- package/dist/types/src/lib/index.d.ts +7 -6
- package/dist/types/src/lib/types.d.ts +8 -8
- package/dist/types/src/mothership/test.d.ts +20 -1
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +344 -54
- package/docs/style.md +116 -0
- package/docs.html +537 -0
- package/example.css +351 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
- package/index.html +246 -24
- package/logo.svg +72 -0
- package/package.json +6 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +24 -43
- package/src/Init.ts +4 -4
- package/src/Node.ts +6 -20
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
- package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
- package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
- package/src/PM/nodeSidecar.ts +2 -2
- package/src/PM/pure.ts +0 -4
- package/src/Project.tsx +289 -292
- package/src/Pure.ts +13 -14
- package/src/PureSidecar.ts +1 -0
- package/src/TestReport.tsx +179 -165
- package/src/Types.ts +29 -144
- package/src/Web.ts +15 -11
- package/src/build.ts +22 -73
- package/src/defaultConfig.ts +2 -1
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +7 -162
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +8 -3
- package/src/lib/core.ts +12 -12
- package/src/lib/index.ts +21 -24
- package/src/lib/types.ts +23 -9
- package/src/mothership/test.ts +13 -10
- package/src/run.ts +1 -1
- package/src/style.css +1 -1
- package/src/utils/buildTemplates.ts +88 -0
- package/style.css +496 -0
- package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
- package/testeranto/bundles/node/allTests/metafile.json +4151 -0
- package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
- package/testeranto/dev.html +29 -0
- package/testeranto/index.html +28 -27
- package/testeranto/reports/allTests/config.json +57 -0
- package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
- package/testeranto/reports/allTests/index.html +26 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
- package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
- package/testeranto/reports/allTests/summary.json +37 -0
- package/testeranto.config.ts +16 -26
- package/tsc.log +66 -69
- package/dist/common/src/SP__Polygon.test.js +0 -10
- package/dist/module/src/ReportClient.js +0 -132
- package/dist/module/src/SP__Polygon.test.js +0 -8
- package/dist/prebuild/ReportClient.js +0 -3
- package/dist/types/src/SP__Polygon.test.d.ts +0 -1
- package/src/ReportClient.tsx +0 -164
- package/src/SP__Polygon.test.ts +0 -13
- package/testeranto/ReportClient.css +0 -11367
- package/testeranto/ReportClient.js +0 -24641
- package/testeranto/bundles/node/mothership/metafile.json +0 -389
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
- package/testeranto/reports/mothership/config.json +0 -25
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
- package/testeranto/reports/mothership/summary.json +0 -9
- /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
- /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
- /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import net from "net";
|
|
2
|
-
import { ITTestResourceConfiguration } from "../lib";
|
|
2
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
3
3
|
import { PM_sidecar } from "./sidecar";
|
|
4
|
+
import { PassThrough } from "stream";
|
|
4
5
|
export declare class PM_Node_Sidecar extends PM_sidecar {
|
|
5
6
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
6
7
|
client: net.Socket;
|
|
7
|
-
mockListener?: jest.Mock;
|
|
8
8
|
constructor(t: ITTestResourceConfiguration);
|
|
9
9
|
start(stopper: () => any): Promise<void>;
|
|
10
10
|
stop(): Promise<void>;
|
package/dist/types/src/Pure.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Ibdd_in_any, Ibdd_out, ITestImplementation, ITestInterface, ITestSpecification } from "./CoreTypes.js";
|
|
1
2
|
import Testeranto from "./lib/core.js";
|
|
2
3
|
import { ITTestResourceRequest } from "./lib/index.js";
|
|
3
|
-
|
|
4
|
-
export declare class PureTesteranto<I extends IT, O extends OT, M> extends Testeranto<I, O, M> {
|
|
4
|
+
export declare class PureTesteranto<I extends Ibdd_in_any, O extends Ibdd_out, M> extends Testeranto<I, O, M> {
|
|
5
5
|
constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<I>>);
|
|
6
6
|
receiveTestResourceConfig(partialTestResource: string): Promise<import("./lib/index.js").IFinalResults>;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: <I extends
|
|
8
|
+
declare const _default: <I extends Ibdd_in_any, O extends Ibdd_out, M>(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testInterface: Partial<INodeTestInterface<I>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<I, O, M>>;
|
|
9
9
|
export default _default;
|
|
@@ -2,8 +2,15 @@ import { Plugin } from "esbuild";
|
|
|
2
2
|
import { ITTestResourceConfiguration } from "./lib/index.js";
|
|
3
3
|
import { PM } from "./PM/index.js";
|
|
4
4
|
import { BaseWhen, BaseThen, BaseGiven, BaseCheck, BaseSuite, IGivens } from "./lib/abstractBase.js";
|
|
5
|
-
import {
|
|
6
|
-
export type
|
|
5
|
+
import { Ibdd_in_any, Ibdd_out_any } from "./CoreTypes.js";
|
|
6
|
+
export type ISummary = Record<string, {
|
|
7
|
+
runTimeError: string;
|
|
8
|
+
typeErrors: number;
|
|
9
|
+
staticErrors: number;
|
|
10
|
+
prompt: string;
|
|
11
|
+
failingFeatures: object;
|
|
12
|
+
}>;
|
|
13
|
+
export type SuiteSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
7
14
|
[K in keyof O["suites"]]: (name: string, givens: IGivens<I>, checks: BaseCheck<I>[]) => BaseSuite<I, O>;
|
|
8
15
|
};
|
|
9
16
|
export type TestSummary = {
|
|
@@ -51,28 +58,28 @@ export type ProjectConfig = {
|
|
|
51
58
|
minify?: boolean;
|
|
52
59
|
debug?: boolean;
|
|
53
60
|
};
|
|
54
|
-
export type GivenSpecification<I extends
|
|
61
|
+
export type GivenSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
55
62
|
[K in keyof O["givens"]]: (features: string[], whens: BaseWhen<I>[], thens: BaseThen<I>[], ...xtrasB: O["givens"][K]) => BaseGiven<I>;
|
|
56
63
|
};
|
|
57
|
-
export type WhenSpecification<I extends
|
|
64
|
+
export type WhenSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
58
65
|
[K in keyof O["whens"]]: (...xtrasC: O["whens"][K]) => BaseWhen<I>;
|
|
59
66
|
};
|
|
60
|
-
export type ThenSpecification<I extends
|
|
67
|
+
export type ThenSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
61
68
|
[K in keyof O["thens"]]: (...xtrasD: O["thens"][K]) => BaseThen<I>;
|
|
62
69
|
};
|
|
63
|
-
export type TestSuiteImplementation<O extends
|
|
70
|
+
export type TestSuiteImplementation<O extends Ibdd_out_any> = {
|
|
64
71
|
[K in keyof O["suites"]]: string;
|
|
65
72
|
};
|
|
66
|
-
export type TestGivenImplementation<I extends
|
|
73
|
+
export type TestGivenImplementation<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
67
74
|
[K in keyof O["givens"]]: (...Ig: O["givens"][K]) => I["given"];
|
|
68
75
|
};
|
|
69
|
-
export type TestWhenImplementation<I extends
|
|
76
|
+
export type TestWhenImplementation<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
70
77
|
[K in keyof O["whens"]]: (...Iw: O["whens"][K]) => (zel: I["iselection"], tr: ITTestResourceConfiguration, utils: PM) => Promise<I["when"]>;
|
|
71
78
|
};
|
|
72
|
-
export type TestThenImplementation<I extends
|
|
79
|
+
export type TestThenImplementation<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
73
80
|
[K in keyof O["thens"]]: (...It: O["thens"][K]) => (ssel: I["iselection"], utils: PM) => I["then"];
|
|
74
81
|
};
|
|
75
|
-
export type TestCheckImplementation<I extends
|
|
82
|
+
export type TestCheckImplementation<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
76
83
|
[K in keyof O["checks"]]: (...Ic: O["checks"][K]) => I["given"];
|
|
77
84
|
};
|
|
78
85
|
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
@@ -90,10 +97,6 @@ export type ITestconfig = {
|
|
|
90
97
|
clearScreen: boolean;
|
|
91
98
|
debugger: boolean;
|
|
92
99
|
externals: string[];
|
|
93
|
-
externalTests: Record<string, {
|
|
94
|
-
watch: string[];
|
|
95
|
-
exec: string;
|
|
96
|
-
}>;
|
|
97
100
|
featureIngestor: (s: string) => Promise<string>;
|
|
98
101
|
importPlugins: IPluginFactory[];
|
|
99
102
|
minify: boolean;
|
|
@@ -108,4 +111,5 @@ export type IBuiltConfig = {
|
|
|
108
111
|
} & ITestconfig;
|
|
109
112
|
export type IProject = {
|
|
110
113
|
projects: Record<string, ITestconfig>;
|
|
114
|
+
reportDomain: string;
|
|
111
115
|
};
|
package/dist/types/src/Web.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ITestSpecification, ITestImplementation, ITestInterface, Ibdd_in_any, Ibdd_out } from "./CoreTypes";
|
|
2
2
|
import Testeranto from "./lib/core.js";
|
|
3
3
|
import { ITTestResourceRequest } from "./lib/index.js";
|
|
4
|
-
export declare class WebTesteranto<I extends
|
|
4
|
+
export declare class WebTesteranto<I extends Ibdd_in_any, O extends Ibdd_out, M> extends Testeranto<I, O, M> {
|
|
5
5
|
constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<I>>);
|
|
6
6
|
receiveTestResourceConfig(partialTestResource: any): Promise<import("./lib/index.js").IFinalResults>;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: <I extends
|
|
8
|
+
declare const _default: <I extends Ibdd_in_any, O extends Ibdd_out, M>(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testInterface: Partial<IWebTestInterface<I>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<I, O, M>>;
|
|
9
9
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
1
|
+
import { ITestArtifactory, ITLog, ITTestResourceConfiguration } from ".";
|
|
3
2
|
import { IPM } from "./types.js";
|
|
4
|
-
|
|
5
|
-
export
|
|
3
|
+
import type { Ibdd_in_any, Ibdd_out_any } from "../CoreTypes";
|
|
4
|
+
export type IGivens<I extends Ibdd_in_any> = Record<string, BaseGiven<I>>;
|
|
5
|
+
export declare abstract class BaseSuite<I extends Ibdd_in_any, O extends Ibdd_out_any> {
|
|
6
6
|
name: string;
|
|
7
7
|
givens: IGivens<I>;
|
|
8
8
|
checks: BaseCheck<I>[];
|
|
@@ -37,7 +37,7 @@ export declare abstract class BaseSuite<I extends IT = IT, O extends OT = OT> {
|
|
|
37
37
|
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: IPM): I["istore"];
|
|
38
38
|
run(input: I["iinput"], testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void, pm: IPM): Promise<BaseSuite<I, O>>;
|
|
39
39
|
}
|
|
40
|
-
export declare abstract class BaseGiven<I extends
|
|
40
|
+
export declare abstract class BaseGiven<I extends Ibdd_in_any> {
|
|
41
41
|
name: string;
|
|
42
42
|
features: string[];
|
|
43
43
|
whens: BaseWhen<I>[];
|
|
@@ -69,7 +69,7 @@ export declare abstract class BaseGiven<I extends IT = IT> {
|
|
|
69
69
|
abstract uberCatcher(e: any): any;
|
|
70
70
|
give(subject: I["isubject"], key: string, testResourceConfiguration: ITTestResourceConfiguration, tester: (t: Awaited<I["then"]> | undefined) => boolean, artifactory: ITestArtifactory, tLog: ITLog, pm: IPM, suiteNdx: number): Promise<I["istore"]>;
|
|
71
71
|
}
|
|
72
|
-
export declare abstract class BaseWhen<I extends
|
|
72
|
+
export declare abstract class BaseWhen<I extends Ibdd_in_any> {
|
|
73
73
|
name: string;
|
|
74
74
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
75
75
|
error: Error;
|
|
@@ -81,7 +81,7 @@ export declare abstract class BaseWhen<I extends IT> {
|
|
|
81
81
|
};
|
|
82
82
|
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: IPM, filepath: string): Promise<any>;
|
|
83
83
|
}
|
|
84
|
-
export declare abstract class BaseThen<I extends
|
|
84
|
+
export declare abstract class BaseThen<I extends Ibdd_in_any> {
|
|
85
85
|
name: string;
|
|
86
86
|
thenCB: (storeState: I["iselection"]) => Promise<I["then"]>;
|
|
87
87
|
error: boolean;
|
|
@@ -94,7 +94,7 @@ export declare abstract class BaseThen<I extends IT> {
|
|
|
94
94
|
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: IPM, filepath: string): Promise<I["then"] | undefined>;
|
|
95
95
|
check(): void;
|
|
96
96
|
}
|
|
97
|
-
export declare abstract class BaseCheck<I extends
|
|
97
|
+
export declare abstract class BaseCheck<I extends Ibdd_in_any> {
|
|
98
98
|
key: string;
|
|
99
99
|
name: string;
|
|
100
100
|
features: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Ibdd_in_any, Ibdd_out_any, ITestSpecification } from "../CoreTypes";
|
|
2
|
+
import { ITestJob, ITTestResourceRequest } from ".";
|
|
3
3
|
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser, IPM } from "./types.js";
|
|
4
4
|
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
5
|
-
export declare abstract class BaseBuilder<I extends
|
|
5
|
+
export declare abstract class BaseBuilder<I extends Ibdd_in_any, O extends Ibdd_out_any, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
6
6
|
specs: any;
|
|
7
7
|
assertThis: (t: I["then"]) => {};
|
|
8
8
|
testResourceRequirement: ITTestResourceRequest;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Ibdd_in_any, Ibdd_out_any, ITestImplementation, ITestSpecification } from "../CoreTypes";
|
|
2
2
|
import { BaseBuilder } from "./basebuilder.js";
|
|
3
3
|
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
4
|
import { ITTestResourceRequest } from "./index.js";
|
|
5
5
|
type IExtenstions = Record<string, unknown>;
|
|
6
|
-
export declare abstract class ClassBuilder<I extends
|
|
6
|
+
export declare abstract class ClassBuilder<I extends Ibdd_in_any = Ibdd_in_any, O extends Ibdd_out_any = Ibdd_out_any, M = unknown> extends BaseBuilder<I, O, IExtenstions, IExtenstions, IExtenstions, IExtenstions, IExtenstions> {
|
|
7
7
|
constructor(testImplementation: ITestImplementation<I, O, M> & {
|
|
8
8
|
suites: Record<string, any>;
|
|
9
9
|
givens: Record<string, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IFinalResults, ITTestResourceRequest } from "./index.js";
|
|
2
2
|
import { ClassBuilder } from "./classBuilder.js";
|
|
3
|
-
import {
|
|
4
|
-
export default abstract class Testeranto<I extends
|
|
3
|
+
import type { Ibdd_in_any, Ibdd_out_any, ITestImplementation, ITestInterface, ITestSpecification } from "../CoreTypes";
|
|
4
|
+
export default abstract class Testeranto<I extends Ibdd_in_any, O extends Ibdd_out_any, M> extends ClassBuilder<I, O, M> {
|
|
5
5
|
constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M> & {
|
|
6
6
|
suites: Record<string, any>;
|
|
7
7
|
givens: Record<string, any>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PM_Pure } from "../PM/pure.js";
|
|
2
2
|
import { PM_Node } from "../PM/node.js";
|
|
3
3
|
import { PM_Web } from "../PM/web.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ITestconfig, IBuiltConfig, IRunTime, ITestTypes } from "../Types.js";
|
|
5
5
|
import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
6
|
+
import type { ITestInterface, Ibdd_in_any, Ibdd_out_any } from "../CoreTypes.js";
|
|
7
|
+
export declare const BaseTestInterface: <T extends Ibdd_in_any>() => ITestInterface<T>;
|
|
8
|
+
export declare const DefaultTestInterface: <T extends Ibdd_in_any>(p: Partial<ITestInterface<T>>) => ITestInterface<T>;
|
|
8
9
|
export type ITTestResourceConfiguration = {
|
|
9
10
|
name: string;
|
|
10
11
|
fs: string;
|
|
@@ -33,14 +34,14 @@ export type ITestArtificer = (key: string, data: any) => void;
|
|
|
33
34
|
type ITest = {
|
|
34
35
|
toObj(): object;
|
|
35
36
|
name: string;
|
|
36
|
-
givens: IGivens<
|
|
37
|
-
checks: BaseCheck<
|
|
37
|
+
givens: IGivens<Ibdd_in_any>;
|
|
38
|
+
checks: BaseCheck<Ibdd_in_any>[];
|
|
38
39
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
39
40
|
};
|
|
40
41
|
export type ITestJob = {
|
|
41
42
|
toObj(): object;
|
|
42
43
|
test: ITest;
|
|
43
|
-
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<
|
|
44
|
+
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<Ibdd_in_any, Ibdd_out_any>>;
|
|
44
45
|
testResourceRequirement: ITTestResourceRequirement;
|
|
45
46
|
receiveTestResourceConfig: (pm: PM_Node | PM_Web | PM_Pure) => IFinalResults;
|
|
46
47
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { Ibdd_in_any, Ibdd_out_any } from "../CoreTypes";
|
|
1
2
|
import { PM_Node } from "../PM/node";
|
|
2
3
|
import { PM_Pure } from "../PM/pure";
|
|
3
4
|
import { PM_Web } from "../PM/web";
|
|
4
|
-
import type { IT, OT } from "../Types";
|
|
5
5
|
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
6
6
|
export type IPM = PM_Node | PM_Web | PM_Pure;
|
|
7
|
-
export type TestPhase =
|
|
7
|
+
export type TestPhase = "beforeAll" | "beforeEach" | "test" | "afterEach" | "afterAll";
|
|
8
8
|
export type TestError = {
|
|
9
9
|
phase: TestPhase;
|
|
10
10
|
error: Error;
|
|
@@ -14,11 +14,11 @@ export type TestError = {
|
|
|
14
14
|
additionalInfo?: Record<string, unknown>;
|
|
15
15
|
isRetryable?: boolean;
|
|
16
16
|
};
|
|
17
|
-
export type ITestCheckCallback<I extends
|
|
17
|
+
export type ITestCheckCallback<I extends Ibdd_in_any, O extends Ibdd_out_any> = {
|
|
18
18
|
[K in keyof O["checks"]]: (name: string, features: string[], checkCallback: (store: I["istore"], pm: IPM) => Promise<O["checks"][K]>, ...xtrasA: O["checks"][K]) => BaseCheck<I>;
|
|
19
19
|
};
|
|
20
|
-
export type ISuiteKlasser<I extends
|
|
21
|
-
export type IGivenKlasser<I extends
|
|
22
|
-
export type IWhenKlasser<I extends
|
|
23
|
-
export type IThenKlasser<I extends
|
|
24
|
-
export type ICheckKlasser<I extends
|
|
20
|
+
export type ISuiteKlasser<I extends Ibdd_in_any, O extends Ibdd_out_any> = (name: string, index: number, givens: IGivens<I>, checks: BaseCheck<I>[]) => BaseSuite<I, O>;
|
|
21
|
+
export type IGivenKlasser<I extends Ibdd_in_any> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<I>;
|
|
22
|
+
export type IWhenKlasser<I extends Ibdd_in_any> = (s: any, o: any) => BaseWhen<I>;
|
|
23
|
+
export type IThenKlasser<I extends Ibdd_in_any> = (s: any, o: any) => BaseThen<I>;
|
|
24
|
+
export type ICheckKlasser<I extends Ibdd_in_any> = (n: any, f: any, cb: any, w: any, t: any) => BaseCheck<I>;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { Ibdd_in, Ibdd_out, Ibdd_in_any } from "../CoreTypes";
|
|
2
|
+
import type { Express } from "express";
|
|
3
|
+
type I = Ibdd_in<(port: number) => Express, (port: number) => Express, any, any, any, any, any>;
|
|
4
|
+
type O = Ibdd_out<{
|
|
5
|
+
TheMothership: [null];
|
|
6
|
+
}, {
|
|
7
|
+
ItIsRunning: [];
|
|
8
|
+
}, {
|
|
9
|
+
IClaimTheResource: [string];
|
|
10
|
+
IReleaseTheResource: [string];
|
|
11
|
+
IResetTheResource: [string];
|
|
12
|
+
}, {
|
|
13
|
+
TheResourceIsClaimed: [string];
|
|
14
|
+
TheResourceIsUnClaimed: [string];
|
|
15
|
+
}, {
|
|
16
|
+
AnEmptyState: any;
|
|
17
|
+
}>;
|
|
18
|
+
declare const _default: Promise<import("../lib/core").default<Ibdd_in_any, O, {
|
|
19
|
+
whens: import("../Types").TestWhenImplementation<I, O>;
|
|
20
|
+
}>>;
|
|
2
21
|
export default _default;
|