testeranto 0.111.0 → 0.112.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/dist/common/Init.js +68 -0
- package/dist/common/Node.js +27 -0
- package/dist/common/PM/index.js +7 -0
- package/dist/common/PM/main.js +1176 -0
- package/dist/common/PM/node.js +128 -0
- package/dist/common/PM/web.js +121 -0
- package/dist/common/ReportServer.js +22 -0
- package/dist/common/SubPackages/react/component/node.js +19 -0
- package/dist/common/SubPackages/react/component/web.js +19 -0
- package/dist/common/SubPackages/react/jsx/index.js +21 -0
- package/dist/common/SubPackages/react/jsx/node.js +10 -0
- package/dist/common/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/SubPackages/react-dom/component/node.js +88 -0
- package/dist/common/SubPackages/react-dom/component/web.js +67 -0
- package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
- package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
- package/dist/common/SubPackages/react-dom/jsx/web.js +128 -0
- package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +54 -0
- package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
- package/dist/common/SubPackages/react-test-renderer/component/interface.js +70 -0
- package/dist/common/SubPackages/react-test-renderer/component/node.js +8 -0
- package/dist/common/SubPackages/react-test-renderer/component/web.js +8 -0
- package/dist/common/SubPackages/react-test-renderer/fc/node.js +60 -0
- package/dist/common/SubPackages/react-test-renderer/fc/web.js +60 -0
- package/dist/common/SubPackages/react-test-renderer/jsx/index.js +67 -0
- package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +52 -0
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/node.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/web.js +10 -0
- package/dist/common/Types.js +2 -0
- package/dist/common/Web.js +49 -0
- package/dist/common/build.js +222 -0
- package/dist/common/defaultConfig.js +20 -0
- package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
- package/dist/common/esbuildConfigs/featuresPlugin.js +39 -0
- package/dist/common/esbuildConfigs/index.js +21 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
- package/dist/common/esbuildConfigs/node.js +37 -0
- package/dist/common/esbuildConfigs/web.js +50 -0
- package/dist/common/init-docs.js +53 -0
- package/dist/common/lib/abstractBase.js +329 -0
- package/dist/common/lib/basebuilder.js +98 -0
- package/dist/common/lib/classBuilder.js +40 -0
- package/dist/common/lib/core.js +117 -0
- package/dist/common/lib/index.js +21 -0
- package/dist/common/lib/types.js +2 -0
- package/dist/common/package.json +3 -0
- package/dist/common/puppeteerConfiger.js +24 -0
- package/dist/common/run.js +62 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -0
- package/dist/common/utils.js +43 -0
- package/dist/common/web.html.js +22 -0
- package/dist/module/Footer.js +4 -0
- package/dist/module/Init.js +63 -0
- package/dist/module/Node.js +20 -0
- package/dist/module/PM/index.js +3 -0
- package/dist/module/PM/main.js +1136 -0
- package/dist/module/PM/node.js +121 -0
- package/dist/module/PM/web.js +117 -0
- package/dist/module/ReportClient.js +97 -0
- package/dist/module/ReportServer.js +17 -0
- package/dist/module/SubPackages/react/component/node.js +14 -0
- package/dist/module/SubPackages/react/component/web.js +14 -0
- package/dist/module/SubPackages/react/jsx/index.js +15 -0
- package/dist/module/SubPackages/react/jsx/node.js +5 -0
- package/dist/module/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/SubPackages/react-dom/component/node.js +80 -0
- package/dist/module/SubPackages/react-dom/component/web.js +62 -0
- package/dist/module/SubPackages/react-dom/jsx/index.js +1 -0
- package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
- package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
- package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
- package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +31 -0
- package/dist/module/SubPackages/react-test-renderer/component/node.js +3 -0
- package/dist/module/SubPackages/react-test-renderer/component/web.js +3 -0
- package/dist/module/SubPackages/react-test-renderer/fc/node.js +22 -0
- package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +28 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/node.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/web.js +5 -0
- package/dist/module/TestReport.js +91 -0
- package/dist/module/Types.js +1 -0
- package/dist/module/Web.js +42 -0
- package/dist/module/build.js +184 -0
- package/dist/module/defaultConfig.js +18 -0
- package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
- package/dist/module/esbuildConfigs/featuresPlugin.js +34 -0
- package/dist/module/esbuildConfigs/index.js +19 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
- package/dist/module/esbuildConfigs/node.js +32 -0
- package/dist/module/esbuildConfigs/web.js +45 -0
- package/dist/module/init-docs.js +15 -0
- package/dist/module/lib/abstractBase.js +321 -0
- package/dist/module/lib/basebuilder.js +94 -0
- package/dist/module/lib/classBuilder.js +36 -0
- package/dist/module/lib/core.js +114 -0
- package/dist/module/lib/index.js +17 -0
- package/dist/module/lib/types.js +1 -0
- package/dist/module/package.json +3 -0
- package/dist/module/puppeteerConfiger.js +19 -0
- package/dist/module/run.js +24 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -0
- package/dist/module/utils.js +29 -0
- package/dist/module/web.html.js +20 -0
- package/dist/prebuild/ReportClient.css +11367 -0
- package/dist/prebuild/ReportClient.js +24641 -0
- package/dist/prebuild/ReportServer.mjs +16 -0
- package/dist/prebuild/TestReport.css +11367 -0
- package/dist/prebuild/TestReport.js +27484 -0
- package/dist/prebuild/build.mjs +376 -0
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
- package/dist/prebuild/init-docs.mjs +104 -0
- package/dist/prebuild/run.mjs +1153 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Init.d.ts +2 -0
- package/dist/types/Node.d.ts +12 -0
- package/dist/types/PM/index.d.ts +34 -0
- package/dist/types/PM/main.d.ts +66 -0
- package/dist/types/PM/node.d.ts +40 -0
- package/dist/types/PM/web.d.ts +38 -0
- package/dist/types/ReportServer.d.ts +1 -0
- package/dist/types/SubPackages/react/component/node.d.ts +7 -0
- package/dist/types/SubPackages/react/component/web.d.ts +7 -0
- package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
- package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/SubPackages/react-dom/component/node.d.ts +11 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
- package/dist/types/Types.d.ts +61 -0
- package/dist/types/Web.d.ts +9 -0
- package/dist/types/build.d.ts +1 -0
- package/dist/types/defaultConfig.d.ts +3 -0
- package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
- package/dist/types/esbuildConfigs/featuresPlugin.d.ts +5 -0
- package/dist/types/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +6 -0
- package/dist/types/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/init-docs.d.ts +1 -0
- package/dist/types/lib/abstractBase.d.ts +110 -0
- package/dist/types/lib/basebuilder.d.ts +27 -0
- package/dist/types/lib/classBuilder.d.ts +7 -0
- package/dist/types/lib/core.d.ts +7 -0
- package/dist/types/lib/index.d.ts +83 -0
- package/dist/types/lib/types.d.ts +14 -0
- package/dist/types/puppeteerConfiger.d.ts +4 -0
- package/dist/types/run.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/utils.d.ts +15 -0
- package/dist/types/web.html.d.ts +2 -0
- package/package.json +1 -1
- package/src/PM/main.ts +25 -57
- package/src/ReportClient.tsx +43 -41
- package/src/run.ts +8 -5
- package/src/utils.ts +10 -0
- package/tsc.log +8 -8
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { PM } from "../PM/index.js";
|
|
2
|
+
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
3
|
+
import { Ibdd_in, Ibdd_out } from "../Types.js";
|
|
4
|
+
export type IGivens<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = Record<string, BaseGiven<I>>;
|
|
5
|
+
export declare abstract class BaseSuite<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> {
|
|
6
|
+
name: string;
|
|
7
|
+
givens: IGivens<I>;
|
|
8
|
+
checks: BaseCheck<I, O>[];
|
|
9
|
+
store: I["istore"];
|
|
10
|
+
fails: BaseGiven<I>[];
|
|
11
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
12
|
+
index: number;
|
|
13
|
+
constructor(name: string, index: number, givens?: IGivens<I>, checks?: BaseCheck<I, O>[]);
|
|
14
|
+
features(): string[];
|
|
15
|
+
toObj(): {
|
|
16
|
+
name: string;
|
|
17
|
+
givens: {
|
|
18
|
+
key: string;
|
|
19
|
+
name: string;
|
|
20
|
+
whens: {
|
|
21
|
+
name: string;
|
|
22
|
+
error: boolean;
|
|
23
|
+
}[];
|
|
24
|
+
thens: {
|
|
25
|
+
name: string;
|
|
26
|
+
error: boolean;
|
|
27
|
+
}[];
|
|
28
|
+
error: (string | Error | undefined)[] | null;
|
|
29
|
+
features: string[];
|
|
30
|
+
}[];
|
|
31
|
+
fails: BaseGiven<I>[];
|
|
32
|
+
features: string[];
|
|
33
|
+
};
|
|
34
|
+
setup(s: I["iinput"], artifactory: ITestArtifactory, tr: ITTestResourceConfiguration, pm: PM): Promise<I["isubject"]>;
|
|
35
|
+
assertThat(t: I["then"]): unknown;
|
|
36
|
+
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: PM): I["istore"];
|
|
37
|
+
run(input: I["iinput"], testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void, pm: PM): Promise<BaseSuite<I, O>>;
|
|
38
|
+
}
|
|
39
|
+
export declare abstract class BaseGiven<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> {
|
|
40
|
+
name: string;
|
|
41
|
+
features: string[];
|
|
42
|
+
whens: BaseWhen<I>[];
|
|
43
|
+
thens: BaseThen<I>[];
|
|
44
|
+
error: Error;
|
|
45
|
+
fail: any;
|
|
46
|
+
store: I["istore"];
|
|
47
|
+
recommendedFsPath: string;
|
|
48
|
+
givenCB: I["given"];
|
|
49
|
+
initialValues: any;
|
|
50
|
+
key: string;
|
|
51
|
+
constructor(name: string, features: string[], whens: BaseWhen<I>[], thens: BaseThen<I>[], givenCB: I["given"], initialValues: any);
|
|
52
|
+
beforeAll(store: I["istore"], initializer: any, artifactory: any, testResource: any, initialValues: any, pm: any): I["istore"];
|
|
53
|
+
toObj(): {
|
|
54
|
+
key: string;
|
|
55
|
+
name: string;
|
|
56
|
+
whens: {
|
|
57
|
+
name: string;
|
|
58
|
+
error: boolean;
|
|
59
|
+
}[];
|
|
60
|
+
thens: {
|
|
61
|
+
name: string;
|
|
62
|
+
error: boolean;
|
|
63
|
+
}[];
|
|
64
|
+
error: (string | Error | undefined)[] | null;
|
|
65
|
+
features: string[];
|
|
66
|
+
};
|
|
67
|
+
abstract givenThat(subject: I["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: I["given"], initialValues: any, pm: PM): Promise<I["istore"]>;
|
|
68
|
+
afterEach(store: I["istore"], key: string, artifactory: ITestArtifactory, pm: PM): Promise<unknown>;
|
|
69
|
+
abstract uberCatcher(e: any): any;
|
|
70
|
+
give(subject: I["isubject"], key: string, testResourceConfiguration: ITTestResourceConfiguration, tester: (t: Awaited<I["then"]> | undefined) => boolean, artifactory: ITestArtifactory, tLog: ITLog, pm: PM, suiteNdx: number): Promise<I["istore"]>;
|
|
71
|
+
}
|
|
72
|
+
export declare abstract class BaseWhen<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> {
|
|
73
|
+
name: string;
|
|
74
|
+
whenCB: (x: I["iselection"]) => I["then"];
|
|
75
|
+
error: boolean;
|
|
76
|
+
constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]);
|
|
77
|
+
abstract andWhen(store: I["istore"], whenCB: (x: I["iselection"]) => I["then"], testResource: any, pm: PM): Promise<any>;
|
|
78
|
+
toObj(): {
|
|
79
|
+
name: string;
|
|
80
|
+
error: boolean;
|
|
81
|
+
};
|
|
82
|
+
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: PM, filepath: string): Promise<any>;
|
|
83
|
+
}
|
|
84
|
+
export declare abstract class BaseThen<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> {
|
|
85
|
+
name: string;
|
|
86
|
+
thenCB: (storeState: I["iselection"]) => I["then"];
|
|
87
|
+
error: boolean;
|
|
88
|
+
constructor(name: string, thenCB: (val: I["iselection"]) => I["then"]);
|
|
89
|
+
toObj(): {
|
|
90
|
+
name: string;
|
|
91
|
+
error: boolean;
|
|
92
|
+
};
|
|
93
|
+
abstract butThen(store: I["istore"], thenCB: any, testResourceConfiguration: ITTestResourceConfiguration, pm: PM): Promise<I["iselection"]>;
|
|
94
|
+
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: PM, filepath: string): Promise<I["then"] | undefined>;
|
|
95
|
+
}
|
|
96
|
+
export declare abstract class BaseCheck<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> {
|
|
97
|
+
name: string;
|
|
98
|
+
features: string[];
|
|
99
|
+
checkCB: (whens: any, thens: any) => any;
|
|
100
|
+
whens: {
|
|
101
|
+
[K in keyof O["whens"]]: (p: any, tc: any) => BaseWhen<I>;
|
|
102
|
+
};
|
|
103
|
+
thens: {
|
|
104
|
+
[K in keyof O["thens"]]: (p: any, tc: any) => BaseThen<I>;
|
|
105
|
+
};
|
|
106
|
+
constructor(name: string, features: string[], checkCB: (whens: any, thens: any) => any, whens: any, thens: any);
|
|
107
|
+
abstract checkThat(subject: I["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, pm: PM): Promise<I["istore"]>;
|
|
108
|
+
afterEach(store: I["istore"], key: string, cb: any, pm: PM): Promise<unknown>;
|
|
109
|
+
check(subject: I["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, pm: PM): Promise<void>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ITTestResourceRequest, ITestJob } from ".";
|
|
2
|
+
import { Ibdd_in, Ibdd_out, ITestSpecification } from "../Types.js";
|
|
3
|
+
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
|
+
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
5
|
+
import { PM } from "../PM/index.js";
|
|
6
|
+
export declare abstract class BaseBuilder<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
7
|
+
readonly input: I["iinput"];
|
|
8
|
+
specs: any;
|
|
9
|
+
assertThis: (t: I["then"]) => {};
|
|
10
|
+
testResourceRequirement: ITTestResourceRequest;
|
|
11
|
+
artifacts: Promise<unknown>[];
|
|
12
|
+
testJobs: ITestJob[];
|
|
13
|
+
testSpecification: ITestSpecification<I, O>;
|
|
14
|
+
suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<I, O>>;
|
|
15
|
+
givenOverides: Record<keyof GivenExtensions, IGivenKlasser<I>>;
|
|
16
|
+
whenOverides: Record<keyof WhenExtensions, IWhenKlasser<I>>;
|
|
17
|
+
thenOverides: Record<keyof ThenExtensions, IThenKlasser<I>>;
|
|
18
|
+
checkOverides: Record<keyof CheckExtensions, ICheckKlasser<I, O>>;
|
|
19
|
+
puppetMaster: PM;
|
|
20
|
+
constructor(input: I["iinput"], suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<I, O>>, givenOverides: Record<keyof GivenExtensions, IGivenKlasser<I>>, whenOverides: Record<keyof WhenExtensions, IWhenKlasser<I>>, thenOverides: Record<keyof ThenExtensions, IThenKlasser<I>>, checkOverides: Record<keyof CheckExtensions, ICheckKlasser<I, O>>, testResourceRequirement: ITTestResourceRequest, testSpecification: any);
|
|
21
|
+
Specs(): any;
|
|
22
|
+
Suites(): Record<keyof SuiteExtensions, ISuiteKlasser<I, O>>;
|
|
23
|
+
Given(): Record<keyof GivenExtensions, (name: string, features: string[], whens: BaseWhen<I>[], thens: BaseThen<I>[], gcb: any) => BaseGiven<I>>;
|
|
24
|
+
When(): Record<keyof WhenExtensions, (arg0: I["istore"], ...arg1: any) => BaseWhen<I>>;
|
|
25
|
+
Then(): Record<keyof ThenExtensions, (selection: I["iselection"], expectation: any) => BaseThen<I>>;
|
|
26
|
+
Check(): Record<keyof CheckExtensions, (feature: string, callback: (whens: any, thens: any) => any, whens: any, thens: any, x: any) => BaseCheck<I, O>>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ibdd_in, Ibdd_out, ITestImplementation, ITestSpecification } from "../Types.js";
|
|
2
|
+
import { BaseBuilder } from "./basebuilder.js";
|
|
3
|
+
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
|
+
import { ITTestResourceRequest } from "./index.js";
|
|
5
|
+
export declare abstract class ClassBuilder<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends BaseBuilder<I, O, any, any, any, any, any> {
|
|
6
|
+
constructor(testImplementation: ITestImplementation<I, O>, testSpecification: ITestSpecification<I, O>, input: I["iinput"], suiteKlasser: ISuiteKlasser<I, O>, givenKlasser: IGivenKlasser<I>, whenKlasser: IWhenKlasser<I>, thenKlasser: IThenKlasser<I>, checkKlasser: ICheckKlasser<I, O>, testResourceRequirement: ITTestResourceRequest);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ITestSpecification, ITestImplementation, ITestInterface, Ibdd_in, Ibdd_out } from "../Types.js";
|
|
2
|
+
import { IFinalResults, ITTestResourceRequest } from "./index.js";
|
|
3
|
+
import { ClassBuilder } from "./classBuilder.js";
|
|
4
|
+
export default abstract class Testeranto<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends ClassBuilder<I, O> {
|
|
5
|
+
constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O>, testResourceRequirement: ITTestResourceRequest | undefined, testInterface: Partial<ITestInterface<I>>, uberCatcher: (cb: any) => void);
|
|
6
|
+
abstract receiveTestResourceConfig(partialTestResource: string): Promise<IFinalResults>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { PM } from "../PM/index.js";
|
|
2
|
+
import { Ibdd_in, Ibdd_out, ITestInterface } from "../Types.js";
|
|
3
|
+
import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
|
|
4
|
+
export declare const BaseTestInterface: ITestInterface<Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>>;
|
|
5
|
+
export declare const DefaultTestInterface: (p: Partial<ITestInterface<any>>) => ITestInterface<any>;
|
|
6
|
+
export type ITTestResourceConfiguration = {
|
|
7
|
+
name: string;
|
|
8
|
+
fs: string;
|
|
9
|
+
ports: number[];
|
|
10
|
+
browserWSEndpoint: string;
|
|
11
|
+
};
|
|
12
|
+
export type ITTestResourceRequirement = {
|
|
13
|
+
name: string;
|
|
14
|
+
ports: number;
|
|
15
|
+
fs: string;
|
|
16
|
+
};
|
|
17
|
+
export type ITTestResourceRequest = {
|
|
18
|
+
ports: number;
|
|
19
|
+
};
|
|
20
|
+
export type ITLog = (...string: any[]) => void;
|
|
21
|
+
export type ILogWriter = {
|
|
22
|
+
createWriteStream: (line: string) => any | any;
|
|
23
|
+
writeFileSync: (fp: string, contents: string) => any;
|
|
24
|
+
mkdirSync: () => any;
|
|
25
|
+
testArtiFactoryfileWriter: (tLog: ITLog, n: (Promise: any) => void) => (fPath: string, value: unknown) => void;
|
|
26
|
+
};
|
|
27
|
+
export type ITestArtificer = (key: string, data: any) => void;
|
|
28
|
+
type ITest = {
|
|
29
|
+
toObj(): object;
|
|
30
|
+
name: string;
|
|
31
|
+
givens: IGivens<Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>>;
|
|
32
|
+
checks: BaseCheck<Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>[];
|
|
33
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
34
|
+
};
|
|
35
|
+
export type ITestJob<T = PM> = {
|
|
36
|
+
toObj(): object;
|
|
37
|
+
test: ITest;
|
|
38
|
+
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>>;
|
|
39
|
+
testResourceRequirement: ITTestResourceRequirement;
|
|
40
|
+
receiveTestResourceConfig: (pm: PM) => Promise<{
|
|
41
|
+
failed: number;
|
|
42
|
+
artifacts: Promise<unknown>[];
|
|
43
|
+
logPromise: Promise<unknown>;
|
|
44
|
+
features: string[];
|
|
45
|
+
}>;
|
|
46
|
+
};
|
|
47
|
+
export type ITestResults = Promise<{
|
|
48
|
+
test: ITest;
|
|
49
|
+
}>[];
|
|
50
|
+
export declare const defaultTestResourceRequirement: ITTestResourceRequest;
|
|
51
|
+
export type ITestArtifactory = (key: string, value: unknown) => unknown;
|
|
52
|
+
export type IRunnables = {
|
|
53
|
+
nodeEntryPoints: Record<string, string>;
|
|
54
|
+
webEntryPoints: Record<string, string>;
|
|
55
|
+
};
|
|
56
|
+
export type IFinalResults = {
|
|
57
|
+
features: string[];
|
|
58
|
+
failed: number;
|
|
59
|
+
};
|
|
60
|
+
export type IRunTime = `node` | `web`;
|
|
61
|
+
export type ITestTypes = [string, IRunTime, {
|
|
62
|
+
ports: number;
|
|
63
|
+
}, ITestTypes[]];
|
|
64
|
+
export type IPluginFactory = (register: (entrypoint: any, sources: any) => any, entrypoints: any) => Plugin;
|
|
65
|
+
export type IBaseConfig = {
|
|
66
|
+
src: string;
|
|
67
|
+
clearScreen: boolean;
|
|
68
|
+
debugger: boolean;
|
|
69
|
+
devMode: boolean;
|
|
70
|
+
externals: string[];
|
|
71
|
+
minify: boolean;
|
|
72
|
+
outbase: string;
|
|
73
|
+
outdir: string;
|
|
74
|
+
ports: string[];
|
|
75
|
+
tests: ITestTypes[];
|
|
76
|
+
nodePlugins: IPluginFactory[];
|
|
77
|
+
webPlugins: IPluginFactory[];
|
|
78
|
+
featureIngestor: (s: string) => Promise<string>;
|
|
79
|
+
};
|
|
80
|
+
export type IBuiltConfig = {
|
|
81
|
+
buildDir: string;
|
|
82
|
+
} & IBaseConfig;
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ibdd_in, Ibdd_out } from "../Types";
|
|
2
|
+
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
3
|
+
export type ITestCheckCallback<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = {
|
|
4
|
+
[K in keyof O["checks"]]: (name: string, features: string[], callbackA: (whens: {
|
|
5
|
+
[K in keyof O["whens"]]: (...unknown: any[]) => BaseWhen<I>;
|
|
6
|
+
}, thens: {
|
|
7
|
+
[K in keyof O["thens"]]: (...unknown: any[]) => BaseThen<I>;
|
|
8
|
+
}) => Promise<any>, ...xtrasA: O["checks"][K]) => BaseCheck<I, O>;
|
|
9
|
+
};
|
|
10
|
+
export type ISuiteKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = (name: string, index: number, givens: IGivens<I>, checks: BaseCheck<I, O>[]) => BaseSuite<I, O>;
|
|
11
|
+
export type IGivenKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<I>;
|
|
12
|
+
export type IWhenKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = (s: any, o: any) => BaseWhen<I>;
|
|
13
|
+
export type IThenKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = (s: any, o: any) => BaseThen<I>;
|
|
14
|
+
export type ICheckKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = (n: any, f: any, cb: any, w: any, t: any) => BaseCheck<I, O>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|