testeranto 0.70.0 → 0.73.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/README.md +9 -18
- package/dist/common/Node.js +14 -34
- package/dist/common/PM/index.js +71 -0
- package/dist/common/PM/main.js +361 -0
- package/dist/common/PM/node.js +176 -0
- package/dist/common/PM/web.js +174 -0
- package/dist/common/Project.js +20 -2
- package/dist/common/Puppeteer.js +109 -0
- package/dist/common/Reporter.js +119 -0
- package/dist/common/Scheduler.js +1 -0
- package/dist/common/SubPackages/puppeteer.js +3 -1
- package/dist/common/SubPackages/react-dom/component/web.js +98 -45
- package/dist/common/SubPackages/react-test-renderer/jsx/index.js +0 -1
- package/dist/common/Web.js +24 -43
- package/dist/common/esbuildConfigs/web.js +3 -1
- package/dist/common/lib/abstractBase.js +189 -41
- package/dist/common/lib/basebuilder.js +56 -29
- package/dist/common/lib/classBuilder.js +6 -2
- package/dist/common/lib/core.js +41 -45
- package/dist/common/lib/index.js +2 -1
- package/dist/common/preload.js +14 -18
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/Node.js +14 -34
- package/dist/module/PM/index.js +67 -0
- package/dist/module/PM/main.js +331 -0
- package/dist/module/PM/node.js +168 -0
- package/dist/module/PM/web.js +167 -0
- package/dist/module/Project.js +20 -2
- package/dist/module/Puppeteer.js +104 -0
- package/dist/module/Reporter.js +114 -0
- package/dist/module/Scheduler.js +1 -0
- package/dist/module/SubPackages/puppeteer.js +3 -1
- package/dist/module/SubPackages/react/jsx/node.js +1 -1
- package/dist/module/SubPackages/react-dom/component/web.js +98 -45
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -1
- package/dist/module/Web.js +24 -43
- package/dist/module/esbuildConfigs/web.js +3 -1
- package/dist/module/lib/abstractBase.js +189 -41
- package/dist/module/lib/basebuilder.js +56 -29
- package/dist/module/lib/classBuilder.js +6 -2
- package/dist/module/lib/core.js +41 -45
- package/dist/module/lib/index.js +2 -1
- package/dist/module/preload.js +15 -14
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Report.css +1616 -584
- package/dist/prebuild/Report.js +2635 -2506
- package/dist/types/PM/index.d.ts +19 -0
- package/dist/types/PM/main.d.ts +28 -0
- package/dist/types/PM/node.d.ts +26 -0
- package/dist/types/PM/web.d.ts +24 -0
- package/dist/types/Reporter.d.ts +1 -0
- package/dist/types/Scheduler.d.ts +0 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +1 -1
- package/dist/types/lib/abstractBase.d.ts +13 -12
- package/dist/types/lib/basebuilder.d.ts +4 -2
- package/dist/types/lib/classBuilder.d.ts +2 -2
- package/dist/types/lib/core.d.ts +4 -4
- package/dist/types/lib/index.d.ts +6 -5
- package/dist/types/lib/types.d.ts +16 -24
- package/dist/types/preload.d.ts +0 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -5
- package/src/Node.ts +18 -43
- package/src/PM/index.ts +102 -0
- package/src/PM/main.ts +420 -0
- package/src/PM/node.ts +515 -0
- package/src/PM/web.ts +497 -0
- package/src/Project.ts +21 -2
- package/src/Puppeteer.ts +131 -0
- package/src/Report.tsx +158 -44
- package/src/Reporter.ts +134 -0
- package/src/Scheduler.ts +0 -0
- package/src/SubPackages/puppeteer.ts +3 -3
- package/src/SubPackages/react/jsx/node.ts +5 -8
- package/src/SubPackages/react-dom/component/web.ts +126 -67
- package/src/SubPackages/react-test-renderer/jsx/index.ts +0 -1
- package/src/Web.ts +25 -67
- package/src/esbuildConfigs/web.ts +4 -2
- package/src/lib/abstractBase.ts +260 -65
- package/src/lib/basebuilder.ts +121 -100
- package/src/lib/classBuilder.ts +5 -4
- package/src/lib/core.ts +58 -59
- package/src/lib/index.ts +10 -9
- package/src/lib/types.ts +18 -27
- package/src/preload.ts +14 -14
- package/dist/common/NodeWriter.js +0 -54
- package/dist/common/electron.js +0 -266
- package/dist/module/NodeWriter.js +0 -48
- package/dist/module/electron.js +0 -261
- package/dist/types/NodeWriter.d.ts +0 -2
- package/src/NodeWriter.ts +0 -72
- package/src/electron.ts +0 -317
- package/yarn-error.log +0 -3144
- /package/dist/types/{electron.d.ts → Puppeteer.d.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Browser } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser";
|
|
2
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
3
|
+
export declare abstract class PM {
|
|
4
|
+
server: any;
|
|
5
|
+
browser: Browser;
|
|
6
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
7
|
+
abstract startPuppeteer(options: any, destfolder: string): Promise<Browser>;
|
|
8
|
+
abstract testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): any;
|
|
9
|
+
abstract createWriteStream(filepath: string): any;
|
|
10
|
+
abstract writeFileSync(fp: string, contents: string): any;
|
|
11
|
+
abstract mkdirSync(): any;
|
|
12
|
+
abstract existsSync(fp: string): boolean;
|
|
13
|
+
abstract write(accessObject: {
|
|
14
|
+
uid: number;
|
|
15
|
+
}, contents: string): boolean;
|
|
16
|
+
abstract end(accessObject: {
|
|
17
|
+
uid: number;
|
|
18
|
+
}): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import { PassThrough } from "stream";
|
|
6
|
+
import { ITLog } from "../lib";
|
|
7
|
+
import { IBuiltConfig } from "../lib/types";
|
|
8
|
+
import { PM } from "./index.js";
|
|
9
|
+
export declare class PM_Main extends PM {
|
|
10
|
+
configs: IBuiltConfig;
|
|
11
|
+
ports: Record<number, boolean>;
|
|
12
|
+
queue: any[];
|
|
13
|
+
constructor(configs: IBuiltConfig);
|
|
14
|
+
startPuppeteer(options: any, destfolder: string): Promise<any>;
|
|
15
|
+
launchNode: (src: string, dest: string) => Promise<void>;
|
|
16
|
+
launchWeb: (t: string, dest: string) => void;
|
|
17
|
+
end(accessObject: {
|
|
18
|
+
uid: number;
|
|
19
|
+
}): boolean;
|
|
20
|
+
existsSync(destFolder: string): boolean;
|
|
21
|
+
mkdirSync(fp: string): Promise<string | false | undefined>;
|
|
22
|
+
writeFileSync(fp: string, contents: string): void;
|
|
23
|
+
createWriteStream(filepath: string): fs.WriteStream;
|
|
24
|
+
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): (fPath: any, value: string | Buffer | PassThrough) => void;
|
|
25
|
+
write(accessObject: {
|
|
26
|
+
uid: number;
|
|
27
|
+
}, contents: string): boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { PassThrough } from "stream";
|
|
4
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
5
|
+
import { PM } from "./index.js";
|
|
6
|
+
declare type PuppetMasterServer = Record<string, Promise<any>>;
|
|
7
|
+
export declare function addPageBinding(type: string, name: string, prefix: string): void;
|
|
8
|
+
export declare class PM_Node extends PM {
|
|
9
|
+
server: PuppetMasterServer;
|
|
10
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
11
|
+
constructor(t: ITTestResourceConfiguration);
|
|
12
|
+
existsSync(destFolder: string): boolean;
|
|
13
|
+
mkdirSync(): any;
|
|
14
|
+
write(writeObject: {
|
|
15
|
+
uid: number;
|
|
16
|
+
}, contents: string): any;
|
|
17
|
+
writeFileSync(filepath: string, contents: string): any;
|
|
18
|
+
createWriteStream(filepath: string): any;
|
|
19
|
+
end(writeObject: {
|
|
20
|
+
uid: number;
|
|
21
|
+
}): any;
|
|
22
|
+
customclose(): void;
|
|
23
|
+
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): (fPath: any, value: string | Buffer | PassThrough) => void;
|
|
24
|
+
startPuppeteer(options?: any): Promise<any>;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { PassThrough } from "stream";
|
|
4
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
5
|
+
import { PM } from "./index.js";
|
|
6
|
+
declare type PuppetMasterServer = Record<string, Promise<any>>;
|
|
7
|
+
export declare class PM_Web extends PM {
|
|
8
|
+
server: PuppetMasterServer;
|
|
9
|
+
constructor(t: ITTestResourceConfiguration);
|
|
10
|
+
existsSync(destFolder: string): boolean;
|
|
11
|
+
mkdirSync(): any;
|
|
12
|
+
write(writeObject: {
|
|
13
|
+
uid: number;
|
|
14
|
+
}, contents: string): any;
|
|
15
|
+
writeFileSync(filepath: string, contents: string): any;
|
|
16
|
+
createWriteStream(filepath: string): any;
|
|
17
|
+
end(writeObject: {
|
|
18
|
+
uid: number;
|
|
19
|
+
}): any;
|
|
20
|
+
customclose(): void;
|
|
21
|
+
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): (fPath: any, value: string | Buffer | PassThrough) => void;
|
|
22
|
+
startPuppeteer(options: any, destFolder: string): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
3
|
declare type IInput = typeof React.Component;
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest<any, any>, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any) =>
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IBaseTest } from "../Types";
|
|
2
2
|
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
3
|
-
import {
|
|
3
|
+
import { PM } from "../PM/index.js";
|
|
4
4
|
export declare type IGivens<ITestShape extends IBaseTest> = Record<string, BaseGiven<ITestShape>>;
|
|
5
5
|
export declare abstract class BaseSuite<ITestShape extends IBaseTest> {
|
|
6
6
|
name: string;
|
|
@@ -28,9 +28,10 @@ export declare abstract class BaseSuite<ITestShape extends IBaseTest> {
|
|
|
28
28
|
}[];
|
|
29
29
|
fails: BaseGiven<ITestShape>[];
|
|
30
30
|
};
|
|
31
|
-
setup(s: ITestShape["iinput"], artifactory: ITestArtifactory, tr: ITTestResourceConfiguration,
|
|
31
|
+
setup(s: ITestShape["iinput"], artifactory: ITestArtifactory, tr: ITTestResourceConfiguration, pm: PM): Promise<ITestShape["isubject"]>;
|
|
32
32
|
assertThat(t: ITestShape["then"]): unknown;
|
|
33
|
-
|
|
33
|
+
afterAll(store: ITestShape["istore"], artifactory: ITestArtifactory, pm: PM): ITestShape["istore"];
|
|
34
|
+
run(input: ITestShape["iinput"], testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void, pm: PM): Promise<BaseSuite<ITestShape>>;
|
|
34
35
|
}
|
|
35
36
|
export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
36
37
|
name: string;
|
|
@@ -38,13 +39,13 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
|
38
39
|
whens: BaseWhen<ITestShape>[];
|
|
39
40
|
thens: BaseThen<ITestShape>[];
|
|
40
41
|
error: Error;
|
|
42
|
+
fail: any;
|
|
41
43
|
store: ITestShape["istore"];
|
|
42
44
|
recommendedFsPath: string;
|
|
43
45
|
givenCB: ITestShape["given"];
|
|
44
46
|
initialValues: any;
|
|
45
47
|
constructor(name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], givenCB: ITestShape["given"], initialValues: any);
|
|
46
48
|
beforeAll(store: ITestShape["istore"], artifactory: ITestArtifactory): ITestShape["istore"];
|
|
47
|
-
afterAll(store: ITestShape["istore"], artifactory: ITestArtifactory, utils: IUtils): ITestShape["istore"];
|
|
48
49
|
toObj(): {
|
|
49
50
|
name: string;
|
|
50
51
|
whens: {
|
|
@@ -58,21 +59,21 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
|
58
59
|
error: (string | Error | undefined)[] | null;
|
|
59
60
|
features: string[];
|
|
60
61
|
};
|
|
61
|
-
abstract givenThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: ITestShape["given"]): Promise<ITestShape["istore"]>;
|
|
62
|
-
afterEach(store: ITestShape["istore"], key: string, artifactory: ITestArtifactory,
|
|
63
|
-
give(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester:
|
|
62
|
+
abstract givenThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: ITestShape["given"], pm: PM): Promise<ITestShape["istore"]>;
|
|
63
|
+
afterEach(store: ITestShape["istore"], key: string, artifactory: ITestArtifactory, pm: PM): Promise<unknown>;
|
|
64
|
+
give(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester: (t: Awaited<ITestShape["then"]> | undefined) => boolean, artifactory: ITestArtifactory, tLog: ITLog, pm: PM, suiteNdx: number): Promise<ITestShape["istore"]>;
|
|
64
65
|
}
|
|
65
66
|
export declare abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
66
67
|
name: string;
|
|
67
68
|
whenCB: (x: ITestShape["iselection"]) => ITestShape["then"];
|
|
68
69
|
error: boolean;
|
|
69
70
|
constructor(name: string, whenCB: (xyz: ITestShape["iselection"]) => ITestShape["then"]);
|
|
70
|
-
abstract andWhen(store: ITestShape["istore"], whenCB: (x: ITestShape["iselection"]) => ITestShape["then"], testResource: any): any;
|
|
71
|
+
abstract andWhen(store: ITestShape["istore"], whenCB: (x: ITestShape["iselection"]) => ITestShape["then"], testResource: any, pm: PM): any;
|
|
71
72
|
toObj(): {
|
|
72
73
|
name: string;
|
|
73
74
|
error: boolean;
|
|
74
75
|
};
|
|
75
|
-
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog,
|
|
76
|
+
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog, pm: PM, key: string): Promise<any>;
|
|
76
77
|
}
|
|
77
78
|
export declare abstract class BaseThen<ITestShape extends IBaseTest> {
|
|
78
79
|
name: string;
|
|
@@ -84,7 +85,7 @@ export declare abstract class BaseThen<ITestShape extends IBaseTest> {
|
|
|
84
85
|
error: boolean;
|
|
85
86
|
};
|
|
86
87
|
abstract butThen(store: ITestShape["istore"], thenCB: any, testResourceConfiguration?: any): Promise<ITestShape["iselection"]>;
|
|
87
|
-
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog,
|
|
88
|
+
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog, pm: PM): Promise<ITestShape["then"] | undefined>;
|
|
88
89
|
}
|
|
89
90
|
export declare abstract class BaseCheck<ITestShape extends IBaseTest> {
|
|
90
91
|
name: string;
|
|
@@ -98,6 +99,6 @@ export declare abstract class BaseCheck<ITestShape extends IBaseTest> {
|
|
|
98
99
|
};
|
|
99
100
|
constructor(name: string, features: string[], checkCB: (whens: any, thens: any) => any, whens: any, thens: any);
|
|
100
101
|
abstract checkThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory): Promise<ITestShape["istore"]>;
|
|
101
|
-
afterEach(store: ITestShape["istore"], key: string, cb: any,
|
|
102
|
-
check(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog,
|
|
102
|
+
afterEach(store: ITestShape["istore"], key: string, cb: any, pm: PM): Promise<unknown>;
|
|
103
|
+
check(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, pm: PM): Promise<void>;
|
|
103
104
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ITTestResourceRequest, ITestJob
|
|
1
|
+
import { ITTestResourceRequest, ITestJob } from ".";
|
|
2
2
|
import { IBaseTest, ITestSpecification } from "../Types.js";
|
|
3
3
|
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
4
|
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
5
|
+
import { PM } from "../PM/index.js";
|
|
5
6
|
export declare abstract class BaseBuilder<ITestShape extends IBaseTest, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
6
7
|
readonly input: ITestShape["iinput"];
|
|
7
8
|
specs: any;
|
|
@@ -15,7 +16,8 @@ export declare abstract class BaseBuilder<ITestShape extends IBaseTest, SuiteExt
|
|
|
15
16
|
whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>;
|
|
16
17
|
thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>;
|
|
17
18
|
checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>;
|
|
18
|
-
|
|
19
|
+
puppetMaster: PM;
|
|
20
|
+
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>>, testResourceRequirement: ITTestResourceRequest, testSpecification: any);
|
|
19
21
|
Specs(): any;
|
|
20
22
|
Suites(): Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>;
|
|
21
23
|
Given(): Record<keyof GivenExtensions, (name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], gcb: any) => BaseGiven<ITestShape>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../Types.js";
|
|
2
2
|
import { BaseBuilder } from "./basebuilder.js";
|
|
3
|
-
import { ILogWriter, ITTestResourceRequest } from ".";
|
|
4
3
|
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
|
+
import { ITTestResourceRequest } from "./index.js";
|
|
5
5
|
export declare abstract class ClassBuilder<ITestShape extends IBaseTest> extends BaseBuilder<ITestShape, any, any, any, any, any> {
|
|
6
|
-
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
|
|
6
|
+
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);
|
|
7
7
|
}
|
package/dist/types/lib/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IBaseTest, ITestSpecification, ITestImplementation } from "../Types.js";
|
|
2
|
-
import { ITestInterface
|
|
3
|
-
import {
|
|
2
|
+
import { ITestInterface } from "./types.js";
|
|
3
|
+
import { ITTestResourceRequest } from "./index.js";
|
|
4
4
|
import { ClassBuilder } from "./classBuilder.js";
|
|
5
5
|
export default abstract class Testeranto<ITestShape extends IBaseTest> extends ClassBuilder<ITestShape> {
|
|
6
|
-
constructor(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape>, testResourceRequirement: ITTestResourceRequest | undefined,
|
|
7
|
-
abstract receiveTestResourceConfig(
|
|
6
|
+
constructor(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape>, testResourceRequirement: ITTestResourceRequest | undefined, testInterface: Partial<ITestInterface<ITestShape>>);
|
|
7
|
+
abstract receiveTestResourceConfig(partialTestResource: string): any;
|
|
8
8
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { PM } from "../PM/index.js";
|
|
1
2
|
import { IBaseTest } from "../Types.js";
|
|
2
3
|
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen } from "./abstractBase.js";
|
|
3
|
-
import {
|
|
4
|
+
import { ITestInterface } from "./types.js";
|
|
4
5
|
export declare const BaseTestInterface: ITestInterface<IBaseTest>;
|
|
5
6
|
export declare const DefaultTestInterface: (p: Partial<ITestInterface<any>>) => ITestInterface<any>;
|
|
6
7
|
export declare type ITTestResourceConfiguration = {
|
|
7
8
|
name: string;
|
|
8
9
|
fs: string;
|
|
9
10
|
ports: number[];
|
|
10
|
-
|
|
11
|
+
browserWSEndpoint: string;
|
|
11
12
|
};
|
|
12
13
|
export declare type ITTestResourceRequirement = {
|
|
13
14
|
name: string;
|
|
@@ -21,7 +22,7 @@ export declare type ITLog = (...string: any[]) => void;
|
|
|
21
22
|
export declare type ILogWriter = {
|
|
22
23
|
createWriteStream: (line: string) => any | any;
|
|
23
24
|
writeFileSync: (fp: string, contents: string) => any;
|
|
24
|
-
mkdirSync: (
|
|
25
|
+
mkdirSync: () => any;
|
|
25
26
|
testArtiFactoryfileWriter: (tLog: ITLog, n: (Promise: any) => void) => (fPath: string, value: unknown) => void;
|
|
26
27
|
};
|
|
27
28
|
export declare type ITestArtificer = (key: string, data: any) => void;
|
|
@@ -32,12 +33,12 @@ declare type ITest = {
|
|
|
32
33
|
checks: BaseCheck<IBaseTest>[];
|
|
33
34
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
34
35
|
};
|
|
35
|
-
export declare type ITestJob<T =
|
|
36
|
+
export declare type ITestJob<T = PM> = {
|
|
36
37
|
toObj(): object;
|
|
37
38
|
test: ITest;
|
|
38
39
|
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<IBaseTest>>;
|
|
39
40
|
testResourceRequirement: ITTestResourceRequirement;
|
|
40
|
-
receiveTestResourceConfig: (
|
|
41
|
+
receiveTestResourceConfig: (pm: PM) => Promise<{
|
|
41
42
|
failed: number;
|
|
42
43
|
artifacts: Promise<unknown>[];
|
|
43
44
|
logPromise: Promise<unknown>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/// <reference types="electron" />
|
|
2
1
|
import { IBaseTest } from "../Types";
|
|
3
|
-
import puppeteer from "puppeteer-core";
|
|
4
2
|
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
5
3
|
import { ITTestResourceConfiguration, ITestArtificer } from ".";
|
|
4
|
+
import { PM } from "../PM/index";
|
|
6
5
|
export declare type IRunTime = `node` | `web`;
|
|
7
|
-
export declare type ITestTypes = [string, IRunTime,
|
|
6
|
+
export declare type ITestTypes = [string, IRunTime, {
|
|
7
|
+
ports: number;
|
|
8
|
+
}, ITestTypes[]];
|
|
8
9
|
export declare type IJsonConfig = {
|
|
9
10
|
outdir: string;
|
|
10
11
|
tests: ITestTypes[];
|
|
@@ -27,41 +28,32 @@ export declare type IBaseConfig = {
|
|
|
27
28
|
export declare type IBuiltConfig = {
|
|
28
29
|
buildDir: string;
|
|
29
30
|
} & IBaseConfig;
|
|
30
|
-
export declare type INodeUtils = {
|
|
31
|
-
browser: puppeteer.Browser;
|
|
32
|
-
ipc: Electron.ParentPort;
|
|
33
|
-
};
|
|
34
|
-
export declare type IWebUtils = {
|
|
35
|
-
browser: puppeteer.Browser;
|
|
36
|
-
ipc: Electron.IpcRenderer;
|
|
37
|
-
};
|
|
38
|
-
export declare type IUtils = INodeUtils | IWebUtils;
|
|
39
31
|
export declare type IWebTestInterface<ITestShape extends IBaseTest> = {
|
|
40
32
|
assertThis: (x: ITestShape["then"]) => void;
|
|
41
33
|
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
42
34
|
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
43
|
-
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer,
|
|
44
|
-
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils:
|
|
45
|
-
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils:
|
|
46
|
-
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
35
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, utils: PM) => any;
|
|
36
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils: PM) => Promise<unknown>;
|
|
37
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils: PM) => Promise<ITestShape["isubject"]>;
|
|
38
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, utils: PM) => Promise<ITestShape["istore"]>;
|
|
47
39
|
};
|
|
48
40
|
export declare type INodeTestInterface<ITestShape extends IBaseTest> = {
|
|
49
41
|
assertThis: (x: ITestShape["then"]) => void;
|
|
50
42
|
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
51
43
|
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
52
|
-
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer,
|
|
53
|
-
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer,
|
|
54
|
-
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer,
|
|
44
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, pm: PM) => any;
|
|
45
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, pm: PM) => Promise<unknown>;
|
|
46
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, pm: PM) => Promise<ITestShape["isubject"]>;
|
|
55
47
|
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
56
48
|
};
|
|
57
49
|
export declare type ITestInterface<ITestShape extends IBaseTest> = {
|
|
58
50
|
assertThis: (x: ITestShape["then"]) => void;
|
|
59
|
-
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
51
|
+
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration, pm: PM) => Promise<ITestShape["istore"]>;
|
|
60
52
|
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
61
|
-
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer,
|
|
62
|
-
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer,
|
|
63
|
-
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer,
|
|
64
|
-
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
53
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, pm: PM) => any;
|
|
54
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, pm: PM) => Promise<unknown>;
|
|
55
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, pm: PM) => Promise<ITestShape["isubject"]>;
|
|
56
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, pm: PM) => Promise<ITestShape["istore"]>;
|
|
65
57
|
};
|
|
66
58
|
export declare type ISuiteKlasser<ITestShape extends IBaseTest> = (name: string, index: number, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
67
59
|
export declare type IGivenKlasser<ITestShape extends IBaseTest> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<ITestShape>;
|
package/dist/types/preload.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|