testeranto 0.49.10 → 0.62.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/.nvmrc +1 -0
- package/README.md +71 -9
- package/dist/cjs-shim.js +12 -0
- package/dist/common/Features.js +2 -3
- package/dist/common/Node.js +53 -61
- package/dist/common/Project.js +272 -606
- package/dist/common/SubPackages/puppeteer.js +19 -0
- package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
- package/dist/common/SubPackages/react/jsx/index.js +13 -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 → SubPackages}/react-dom/component/node.js +6 -6
- package/dist/common/{subPackages → SubPackages}/react-dom/component/web.js +11 -12
- package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
- package/dist/common/{subPackages → SubPackages}/react-dom/jsx/web.js +5 -14
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/component/index.js +26 -15
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/web.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
- package/dist/common/{subPackages/react-test-renderer/jsx-promised → SubPackages/react-test-renderer/jsx}/node.js +4 -4
- package/dist/common/{subPackages/react → SubPackages/react-test-renderer}/jsx/web.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
- package/dist/common/Types.js +32 -0
- package/dist/common/Web.js +41 -112
- package/dist/common/electron.js +188 -44
- package/dist/common/esbuildConfigs/features.js +14 -0
- package/dist/common/esbuildConfigs/index.js +20 -0
- package/dist/common/esbuildConfigs/node.js +35 -0
- package/dist/common/esbuildConfigs/report.js +48 -0
- package/dist/common/esbuildConfigs/tests.js +14 -0
- package/dist/common/esbuildConfigs/web.js +50 -0
- package/dist/common/lib/abstractBase.js +193 -0
- package/dist/common/lib/basebuilder.js +86 -0
- package/dist/common/lib/browser.js +26 -0
- package/dist/common/lib/classBuilder.js +41 -0
- package/dist/common/lib/core.js +52 -0
- package/dist/common/lib/index.js +19 -0
- package/dist/common/nodeWriterElectron.js +55 -0
- package/dist/common/preload.js +22 -21
- package/dist/common/report.html.js +31 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/web.html.js +22 -0
- package/dist/module/Features.js +2 -3
- package/dist/module/Node.js +53 -61
- package/dist/module/Project.js +272 -583
- package/dist/module/SubPackages/puppeteer.js +14 -0
- package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
- package/dist/module/SubPackages/react/jsx/index.js +10 -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 → SubPackages}/react-dom/component/node.js +5 -5
- package/dist/module/{subPackages → SubPackages}/react-dom/component/web.js +10 -11
- package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
- package/dist/module/{subPackages → SubPackages}/react-dom/jsx/web.js +4 -13
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/index.js +23 -15
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/web.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
- 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 → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
- package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
- package/dist/module/Types.js +30 -1
- package/dist/module/Web.js +41 -112
- package/dist/module/electron.js +189 -45
- package/dist/module/esbuildConfigs/features.js +12 -0
- package/dist/module/esbuildConfigs/index.js +18 -0
- package/dist/module/esbuildConfigs/node.js +30 -0
- package/dist/module/esbuildConfigs/report.js +48 -0
- package/dist/module/esbuildConfigs/tests.js +12 -0
- package/dist/module/esbuildConfigs/web.js +45 -0
- package/dist/module/lib/abstractBase.js +185 -0
- package/dist/module/lib/basebuilder.js +82 -0
- package/dist/module/lib/browser.js +22 -0
- package/dist/module/lib/classBuilder.js +37 -0
- package/dist/module/lib/core.js +49 -0
- package/dist/module/lib/index.js +15 -0
- package/dist/module/nodeWriterElectron.js +52 -0
- package/dist/module/preload.js +22 -21
- package/dist/module/report.html.js +29 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/web.html.js +20 -0
- package/dist/prebuild/Report.css +10326 -0
- package/dist/prebuild/Report.js +37456 -0
- package/dist/types/Features.d.ts +5 -5
- package/dist/types/Node.d.ts +4 -11
- package/dist/types/NodeWriter.d.ts +1 -1
- package/dist/types/Project.d.ts +2 -27
- package/dist/types/SubPackages/puppeteer.d.ts +6 -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 +15 -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 → SubPackages}/react-dom/component/node.d.ts +2 -4
- package/dist/types/SubPackages/react-dom/component/web.d.ts +5 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/component/index.d.ts +6 -6
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +9 -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 +8 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
- 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 → SubPackages}/react-test-renderer/jsx-promised/index.d.ts +4 -4
- 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 +116 -3
- package/dist/types/Web.d.ts +4 -11
- package/dist/types/esbuildConfigs/features.d.ts +4 -0
- package/dist/types/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/esbuildConfigs/tests.d.ts +4 -0
- package/dist/types/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/lib/abstractBase.d.ts +102 -0
- package/dist/types/lib/basebuilder.d.ts +24 -0
- package/dist/types/lib/browser.d.ts +6 -0
- package/dist/types/lib/classBuilder.d.ts +6 -0
- package/dist/types/lib/core.d.ts +7 -0
- package/dist/types/lib/index.d.ts +57 -0
- package/dist/types/nodeWriterElectron.d.ts +2 -0
- package/dist/types/report.html.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/web.html.d.ts +2 -0
- package/electronBuild.ts +32 -0
- package/index.html +30 -0
- package/package.json +120 -85
- package/src/Features.ts +2 -4
- package/src/Node.ts +114 -160
- package/src/NodeWriter.ts +1 -4
- package/src/Project.ts +610 -753
- package/src/Report.tsx +30 -15
- package/src/SubPackages/puppeteer.ts +46 -0
- package/src/{subPackages → SubPackages}/react/component/node.ts +12 -32
- package/src/SubPackages/react/component/web.ts +53 -0
- package/src/SubPackages/react/jsx/index.ts +43 -0
- package/src/SubPackages/react/jsx/node.ts +29 -0
- package/src/SubPackages/react/jsx/web.ts +28 -0
- package/src/{subPackages → SubPackages}/react-dom/component/node.ts +11 -25
- package/src/{subPackages → SubPackages}/react-dom/component/web.ts +27 -32
- package/src/{subPackages → SubPackages}/react-dom/jsx/index.ts +0 -1
- package/src/SubPackages/react-dom/jsx/node.ts +68 -0
- package/src/{subPackages → SubPackages}/react-dom/jsx/web.ts +18 -54
- package/src/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.ts +9 -28
- package/src/{subPackages → SubPackages}/react-test-renderer/component/index.ts +31 -29
- package/src/SubPackages/react-test-renderer/component/node.ts +22 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +22 -0
- package/src/{subPackages → SubPackages}/react-test-renderer/fc/node.ts +14 -28
- package/src/{subPackages → SubPackages}/react-test-renderer/fc/web.ts +9 -25
- package/src/{subPackages → SubPackages}/react-test-renderer/jsx/index.ts +19 -16
- package/src/SubPackages/react-test-renderer/jsx/node.ts +24 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
- package/src/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.ts +7 -15
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
- package/src/Types.ts +334 -3
- package/src/Web.ts +104 -230
- package/src/cjs-shim.js +12 -0
- package/src/electron.ts +237 -46
- package/src/esbuildConfigs/features.ts +18 -0
- package/src/esbuildConfigs/index.ts +22 -0
- package/src/esbuildConfigs/node.ts +59 -0
- package/src/esbuildConfigs/report.ts +51 -0
- package/src/esbuildConfigs/tests.ts +20 -0
- package/src/esbuildConfigs/web.ts +73 -0
- package/src/lib/abstractBase.ts +459 -0
- package/src/lib/basebuilder.ts +253 -0
- package/src/lib/browser.ts +34 -0
- package/src/lib/classBuilder.ts +137 -0
- package/src/lib/core.ts +182 -0
- package/src/lib/index.ts +116 -0
- package/src/nodeWriterElectron.ts +71 -0
- package/src/preload.ts +23 -21
- package/src/report.html.ts +29 -0
- package/src/web.html.ts +20 -0
- package/tests/Rectangle.test.ts +189 -0
- package/tsconfig.json +19 -6
- package/tsconfig.module.json +15 -4
- package/tsconfig.types.json +14 -4
- package/yarn-error.log +3144 -0
- package/dist/common/core.js +0 -397
- package/dist/common/subPackages/react/jsx/index.js +0 -26
- package/dist/common/subPackages/react-dom/jsx/node.js +0 -95
- package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
- package/dist/module/Report.js +0 -186
- package/dist/module/core.js +0 -388
- package/dist/module/subPackages/react/jsx/index.js +0 -22
- package/dist/module/subPackages/react/jsx/node.js +0 -5
- package/dist/module/subPackages/react/jsx/web.js +0 -5
- package/dist/module/subPackages/react-dom/jsx/node.js +0 -87
- package/dist/module/subPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/subPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/types/core.d.ts +0 -220
- package/dist/types/subPackages/react/component/node.d.ts +0 -12
- package/dist/types/subPackages/react/component/web.d.ts +0 -12
- package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
- package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
- package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -8
- package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/subPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -8
- package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/fc/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
- package/src/core.ts +0 -1399
- package/src/subPackages/react/component/web.ts +0 -80
- package/src/subPackages/react/jsx/index.ts +0 -64
- package/src/subPackages/react/jsx/node.ts +0 -29
- package/src/subPackages/react/jsx/web.ts +0 -29
- package/src/subPackages/react-dom/jsx/node.ts +0 -145
- package/src/subPackages/react-test-renderer/component/node.ts +0 -30
- package/src/subPackages/react-test-renderer/component/web.ts +0 -30
- package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx-promised/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx-promised/web.ts +0 -31
- /package/dist/common/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/types/{subPackages → SubPackages}/react-dom/jsx/index.d.ts +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
2
|
+
import { IBaseTest, IUtils } from "../Types";
|
|
3
|
+
export declare type IGivens<ITestShape extends IBaseTest> = Record<string, BaseGiven<ITestShape>>;
|
|
4
|
+
export declare abstract class BaseSuite<ITestShape extends IBaseTest> {
|
|
5
|
+
name: string;
|
|
6
|
+
givens: IGivens<ITestShape>;
|
|
7
|
+
checks: BaseCheck<ITestShape>[];
|
|
8
|
+
store: ITestShape['istore'];
|
|
9
|
+
fails: BaseGiven<ITestShape>[];
|
|
10
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
11
|
+
index: number;
|
|
12
|
+
constructor(name: string, index: number, givens?: IGivens<ITestShape>, checks?: BaseCheck<ITestShape>[]);
|
|
13
|
+
toObj(): {
|
|
14
|
+
name: string;
|
|
15
|
+
givens: {
|
|
16
|
+
name: string;
|
|
17
|
+
whens: {
|
|
18
|
+
name: string;
|
|
19
|
+
error: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
thens: {
|
|
22
|
+
name: string;
|
|
23
|
+
error: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
error: (string | Error | undefined)[] | null;
|
|
26
|
+
features: string[];
|
|
27
|
+
}[];
|
|
28
|
+
fails: BaseGiven<ITestShape>[];
|
|
29
|
+
};
|
|
30
|
+
setup(s: ITestShape['iinput'], artifactory: ITestArtifactory, tr: ITTestResourceConfiguration, utils: IUtils): Promise<ITestShape['isubject']>;
|
|
31
|
+
assertThat(t: ITestShape['then']): unknown;
|
|
32
|
+
run(input: ITestShape['iinput'], testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void, utils: IUtils): Promise<BaseSuite<ITestShape>>;
|
|
33
|
+
}
|
|
34
|
+
export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
35
|
+
name: string;
|
|
36
|
+
features: string[];
|
|
37
|
+
whens: BaseWhen<ITestShape>[];
|
|
38
|
+
thens: BaseThen<ITestShape>[];
|
|
39
|
+
error: Error;
|
|
40
|
+
store: ITestShape['istore'];
|
|
41
|
+
recommendedFsPath: string;
|
|
42
|
+
givenCB: ITestShape['given'];
|
|
43
|
+
initialValues: any;
|
|
44
|
+
constructor(name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], givenCB: ITestShape['given'], initialValues: any);
|
|
45
|
+
beforeAll(store: ITestShape['istore'], artifactory: ITestArtifactory): ITestShape["istore"];
|
|
46
|
+
afterAll(store: ITestShape['istore'], artifactory: ITestArtifactory, utils: IUtils): ITestShape["istore"];
|
|
47
|
+
toObj(): {
|
|
48
|
+
name: string;
|
|
49
|
+
whens: {
|
|
50
|
+
name: string;
|
|
51
|
+
error: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
thens: {
|
|
54
|
+
name: string;
|
|
55
|
+
error: boolean;
|
|
56
|
+
}[];
|
|
57
|
+
error: (string | Error | undefined)[] | null;
|
|
58
|
+
features: string[];
|
|
59
|
+
};
|
|
60
|
+
abstract givenThat(subject: ITestShape['isubject'], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: ITestShape['given']): Promise<ITestShape['istore']>;
|
|
61
|
+
afterEach(store: ITestShape['istore'], key: string, artifactory: ITestArtifactory): Promise<unknown>;
|
|
62
|
+
give(subject: ITestShape['isubject'], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, utils: IUtils): Promise<ITestShape["istore"]>;
|
|
63
|
+
}
|
|
64
|
+
export declare abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
65
|
+
name: string;
|
|
66
|
+
whenCB: (x: ITestShape['iselection']) => ITestShape['then'];
|
|
67
|
+
error: boolean;
|
|
68
|
+
constructor(name: string, whenCB: (xyz: ITestShape['iselection']) => ITestShape['then']);
|
|
69
|
+
abstract andWhen(store: ITestShape['istore'], whenCB: (x: ITestShape['iselection']) => ITestShape['then'], testResource: any): any;
|
|
70
|
+
toObj(): {
|
|
71
|
+
name: string;
|
|
72
|
+
error: boolean;
|
|
73
|
+
};
|
|
74
|
+
test(store: ITestShape['istore'], testResourceConfiguration: any, tLog: ITLog, utils: IUtils): Promise<any>;
|
|
75
|
+
}
|
|
76
|
+
export declare abstract class BaseThen<ITestShape extends IBaseTest> {
|
|
77
|
+
name: string;
|
|
78
|
+
thenCB: (storeState: ITestShape['iselection']) => ITestShape['then'];
|
|
79
|
+
error: boolean;
|
|
80
|
+
constructor(name: string, thenCB: (val: ITestShape['iselection']) => ITestShape['then']);
|
|
81
|
+
toObj(): {
|
|
82
|
+
name: string;
|
|
83
|
+
error: boolean;
|
|
84
|
+
};
|
|
85
|
+
abstract butThen(store: ITestShape['istore'], thenCB: any, testResourceConfiguration?: any): Promise<ITestShape['iselection']>;
|
|
86
|
+
test(store: ITestShape['istore'], testResourceConfiguration: any, tLog: ITLog, utils: IUtils): Promise<ITestShape['then'] | undefined>;
|
|
87
|
+
}
|
|
88
|
+
export declare abstract class BaseCheck<ITestShape extends IBaseTest> {
|
|
89
|
+
name: string;
|
|
90
|
+
features: string[];
|
|
91
|
+
checkCB: (whens: any, thens: any) => any;
|
|
92
|
+
whens: {
|
|
93
|
+
[K in keyof ITestShape["whens"]]: (p: any, tc: any) => BaseWhen<ITestShape>;
|
|
94
|
+
};
|
|
95
|
+
thens: {
|
|
96
|
+
[K in keyof ITestShape["thens"]]: (p: any, tc: any) => BaseThen<ITestShape>;
|
|
97
|
+
};
|
|
98
|
+
constructor(name: string, features: string[], checkCB: (whens: any, thens: any) => any, whens: any, thens: any);
|
|
99
|
+
abstract checkThat(subject: ITestShape['isubject'], testResourceConfiguration: any, artifactory: ITestArtifactory): Promise<ITestShape['istore']>;
|
|
100
|
+
afterEach(store: ITestShape['istore'], key: string, cb?: any): Promise<unknown>;
|
|
101
|
+
check(subject: ITestShape['isubject'], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, utils: IUtils): Promise<void>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IBaseTest, ICheckKlasser, IGivenKlasser, ISuiteKlasser, ITestSpecification, IThenKlasser, IWhenKlasser } from "../Types";
|
|
2
|
+
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
3
|
+
import { ITTestResourceRequest, ITestJob, ILogWriter } from ".";
|
|
4
|
+
export declare abstract class BaseBuilder<ITestShape extends IBaseTest, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
5
|
+
readonly input: ITestShape['iinput'];
|
|
6
|
+
specs: any;
|
|
7
|
+
assertThis: (t: any) => {};
|
|
8
|
+
testResourceRequirement: ITTestResourceRequest;
|
|
9
|
+
artifacts: Promise<unknown>[];
|
|
10
|
+
testJobs: ITestJob[];
|
|
11
|
+
testSpecification: ITestSpecification<ITestShape>;
|
|
12
|
+
suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>;
|
|
13
|
+
givenOverides: Record<keyof GivenExtensions, IGivenKlasser<ITestShape>>;
|
|
14
|
+
whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>;
|
|
15
|
+
thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>;
|
|
16
|
+
checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>;
|
|
17
|
+
constructor(input: ITestShape['iinput'], suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>, givenOverides: Record<keyof GivenExtensions, IGivenKlasser<ITestShape>>, whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>, thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>, checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>, logWriter: ILogWriter, testResourceRequirement: ITTestResourceRequest, testSpecification: any);
|
|
18
|
+
Specs(): any;
|
|
19
|
+
Suites(): Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>;
|
|
20
|
+
Given(): Record<keyof GivenExtensions, (name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], gcb: any) => BaseGiven<ITestShape>>;
|
|
21
|
+
When(): Record<keyof WhenExtensions, (arg0: ITestShape['istore'], ...arg1: any) => BaseWhen<ITestShape>>;
|
|
22
|
+
Then(): Record<keyof ThenExtensions, (selection: ITestShape['iselection'], expectation: any) => BaseThen<ITestShape>>;
|
|
23
|
+
Check(): Record<keyof CheckExtensions, (feature: string, callback: (whens: any, thens: any) => any, whens: any, thens: any, x: any) => BaseCheck<ITestShape>>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IBaseTest, ICheckKlasser, IGivenKlasser, ISuiteKlasser, ITestImplementation, ITestSpecification, IThenKlasser, IWhenKlasser } from "../Types";
|
|
2
|
+
import { BaseBuilder } from "./basebuilder.js";
|
|
3
|
+
import { ILogWriter, ITTestResourceRequest } from ".";
|
|
4
|
+
export declare abstract class ClassBuilder<ITestShape extends IBaseTest> extends BaseBuilder<ITestShape, any, any, any, any, any> {
|
|
5
|
+
constructor(testImplementation: ITestImplementation<ITestShape, any>, testSpecification: ITestSpecification<ITestShape>, input: ITestShape['iinput'], suiteKlasser: ISuiteKlasser<ITestShape>, givenKlasser: IGivenKlasser<ITestShape>, whenKlasser: IWhenKlasser<ITestShape>, thenKlasser: IThenKlasser<ITestShape>, checkKlasser: ICheckKlasser<ITestShape>, testResourceRequirement: ITTestResourceRequest, logWriter: ILogWriter);
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IBaseTest, ITestImplementation, ITestInterface, ITestSpecification, IUtils } from "../Types";
|
|
2
|
+
import { ILogWriter, ITTestResourceConfiguration, ITTestResourceRequest, ITestJob } from "./index.js";
|
|
3
|
+
import { ClassBuilder } from "./classBuilder.js";
|
|
4
|
+
export default abstract class Testeranto<ITestShape extends IBaseTest> extends ClassBuilder<ITestShape> {
|
|
5
|
+
constructor(input: ITestShape['iinput'], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testResourceRequirement: ITTestResourceRequest | undefined, logWriter: ILogWriter, testInterface: Partial<ITestInterface<ITestShape>>);
|
|
6
|
+
abstract receiveTestResourceConfig(t: ITestJob, partialTestResource: ITTestResourceConfiguration, utils: IUtils): any;
|
|
7
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IBaseTest, ITestInterface, IUtils } from "../Types.js";
|
|
2
|
+
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen } from "./abstractBase.js";
|
|
3
|
+
export declare const BaseTestInterface: ITestInterface<IBaseTest>;
|
|
4
|
+
export declare const DefaultTestInterface: (p: Partial<ITestInterface<any>>) => ITestInterface<any>;
|
|
5
|
+
export declare type ITTestResourceConfiguration = {
|
|
6
|
+
name: string;
|
|
7
|
+
fs: string;
|
|
8
|
+
ports: number[];
|
|
9
|
+
scheduled: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare type ITTestResourceRequirement = {
|
|
12
|
+
name: string;
|
|
13
|
+
ports: number;
|
|
14
|
+
fs: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type ITTestResourceRequest = {
|
|
17
|
+
ports: number;
|
|
18
|
+
};
|
|
19
|
+
export declare type ITLog = (...string: any[]) => void;
|
|
20
|
+
export declare type ILogWriter = {
|
|
21
|
+
createWriteStream: (line: string) => any | any;
|
|
22
|
+
writeFileSync: (fp: string, contents: string) => any;
|
|
23
|
+
mkdirSync: (fp: string) => any;
|
|
24
|
+
testArtiFactoryfileWriter: (tLog: ITLog, n: (Promise: any) => void) => (fPath: string, value: unknown) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare type ITestArtificer = (key: string, data: any) => void;
|
|
27
|
+
declare type ITest = {
|
|
28
|
+
toObj(): object;
|
|
29
|
+
name: string;
|
|
30
|
+
givens: IGivens<IBaseTest>;
|
|
31
|
+
checks: BaseCheck<IBaseTest>[];
|
|
32
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
33
|
+
};
|
|
34
|
+
export declare type ITestJob = {
|
|
35
|
+
toObj(): object;
|
|
36
|
+
test: ITest;
|
|
37
|
+
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<IBaseTest>>;
|
|
38
|
+
testResourceRequirement: ITTestResourceRequirement;
|
|
39
|
+
receiveTestResourceConfig: (testResource: any, utils: IUtils) => Promise<{
|
|
40
|
+
failed: number;
|
|
41
|
+
artifacts: Promise<unknown>[];
|
|
42
|
+
logPromise: Promise<unknown>;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
export declare type ITestResults = Promise<{
|
|
46
|
+
test: ITest;
|
|
47
|
+
}>[];
|
|
48
|
+
export declare const defaultTestResourceRequirement: ITTestResourceRequest;
|
|
49
|
+
export declare type ITestArtifactory = (key: string, value: unknown) => unknown;
|
|
50
|
+
export declare type ITestCheckCallback<ITestShape extends IBaseTest> = {
|
|
51
|
+
[K in keyof ITestShape["checks"]]: (name: string, features: string[], callbackA: (whens: {
|
|
52
|
+
[K in keyof ITestShape["whens"]]: (...unknown: any[]) => BaseWhen<ITestShape>;
|
|
53
|
+
}, thens: {
|
|
54
|
+
[K in keyof ITestShape["thens"]]: (...unknown: any[]) => BaseThen<ITestShape>;
|
|
55
|
+
}) => Promise<any>, ...xtrasA: ITestShape["checks"][K]) => BaseCheck<ITestShape>;
|
|
56
|
+
};
|
|
57
|
+
export {};
|