testeranto 0.90.0 → 0.100.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/bundle.js +4 -7
- package/dist/common/src/Node.js +5 -3
- package/dist/common/src/PM/main.js +254 -126
- package/dist/common/src/PM/node.js +20 -5
- package/dist/common/src/PM/web.js +19 -4
- package/dist/common/src/SubPackages/puppeteer.js +1 -1
- package/dist/common/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/common/src/SubPackages/react/jsx/node.js +2 -2
- package/dist/common/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/common/src/Web.js +25 -21
- package/dist/common/src/cli.js +439 -0
- package/dist/common/src/cli2.js +144 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +18 -8
- package/dist/common/src/esbuildConfigs/node.js +1 -4
- package/dist/common/src/esbuildConfigs/web.js +1 -1
- package/dist/common/src/lib/abstractBase.js +31 -263
- package/dist/common/src/lib/basebuilder.js +1 -11
- package/dist/common/src/lib/classBuilder.js +1 -1
- package/dist/common/src/lib/core.js +8 -28
- package/dist/common/src/lib/types.js +1 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Node.js +5 -3
- package/dist/module/src/PM/main.js +254 -126
- package/dist/module/src/PM/node.js +20 -5
- package/dist/module/src/PM/web.js +19 -4
- package/dist/module/src/SubPackages/puppeteer.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/module/src/SubPackages/react/jsx/node.js +2 -2
- package/dist/module/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/module/src/Web.js +25 -21
- package/dist/module/src/cli.js +411 -0
- package/dist/module/src/cli2.js +116 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +18 -8
- package/dist/module/src/esbuildConfigs/node.js +1 -4
- package/dist/module/src/esbuildConfigs/web.js +1 -1
- package/dist/module/src/lib/abstractBase.js +31 -263
- package/dist/module/src/lib/basebuilder.js +1 -11
- package/dist/module/src/lib/classBuilder.js +1 -1
- package/dist/module/src/lib/core.js +8 -28
- package/dist/module/src/lib/types.js +1 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/cli.mjs +1491 -0
- package/dist/prebuild/{run-tests.mjs → cli2.mjs} +223 -212
- package/dist/types/src/Node.d.ts +6 -3
- package/dist/types/src/PM/index.d.ts +10 -2
- package/dist/types/src/PM/main.d.ts +14 -7
- package/dist/types/src/PM/node.d.ts +9 -2
- package/dist/types/src/PM/web.d.ts +9 -3
- package/dist/types/src/SubPackages/puppeteer.d.ts +1 -1
- package/dist/types/src/SubPackages/react/component/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +3 -3
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +3 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +2 -2
- package/dist/types/src/Types.d.ts +60 -21
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +6 -2
- package/dist/types/src/lib/core.d.ts +3 -3
- package/dist/types/src/lib/index.d.ts +1 -1
- package/dist/types/src/lib/types.d.ts +6 -30
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +23 -20
- package/src/Node.ts +6 -3
- package/src/PM/index.ts +12 -8
- package/src/PM/main.ts +331 -165
- package/src/PM/node.ts +42 -7
- package/src/PM/web.ts +33 -5
- package/src/SubPackages/puppeteer.ts +1 -1
- package/src/SubPackages/react/jsx/index.ts +15 -7
- package/src/SubPackages/react/jsx/node.ts +18 -6
- package/src/SubPackages/react-dom/component/web.ts +28 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
- package/src/SubPackages/react-test-renderer/jsx/node.ts +16 -1
- package/src/Types.ts +362 -114
- package/src/Web.ts +45 -23
- package/src/cli.ts +535 -0
- package/src/cli2.ts +157 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +27 -9
- package/src/esbuildConfigs/node.ts +4 -7
- package/src/esbuildConfigs/web.ts +4 -3
- package/src/lib/abstractBase.ts +84 -291
- package/src/lib/basebuilder.ts +1 -12
- package/src/lib/classBuilder.ts +2 -1
- package/src/lib/core.ts +17 -29
- package/src/lib/types.ts +5 -177
- package/dist/common/src/Aider.js +0 -143
- package/dist/common/src/Project.js +0 -225
- package/dist/common/src/Puppeteer.js +0 -113
- package/dist/common/src/build-tests.js +0 -39
- package/dist/common/src/esbuildConfigs/features.js +0 -14
- package/dist/common/src/esbuildConfigs/report.js +0 -14
- package/dist/common/src/esbuildConfigs/tests.js +0 -13
- package/dist/common/src/run-tests.js +0 -39
- package/dist/module/src/Aider.js +0 -136
- package/dist/module/src/Project.js +0 -218
- package/dist/module/src/Puppeteer.js +0 -108
- package/dist/module/src/build-tests.js +0 -11
- package/dist/module/src/esbuildConfigs/features.js +0 -12
- package/dist/module/src/esbuildConfigs/report.js +0 -14
- package/dist/module/src/esbuildConfigs/tests.js +0 -11
- package/dist/module/src/run-tests.js +0 -11
- package/dist/prebuild/build-tests.mjs +0 -552
- package/dist/types/src/Aider.d.ts +0 -1
- package/dist/types/src/Project.d.ts +0 -12
- package/dist/types/src/Puppeteer.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
- package/src/Aider.ts +0 -168
- package/src/Project.ts +0 -291
- package/src/Puppeteer.ts +0 -145
- package/src/build-tests.ts +0 -12
- package/src/esbuildConfigs/features.ts +0 -17
- package/src/esbuildConfigs/report.ts +0 -15
- package/src/esbuildConfigs/tests.ts +0 -14
- package/src/run-tests.ts +0 -12
- /package/dist/types/src/{build-tests.d.ts → cli.d.ts} +0 -0
- /package/dist/types/src/{run-tests.d.ts → cli2.d.ts} +0 -0
package/dist/types/src/Node.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import Testeranto from "./lib/core.js";
|
|
2
2
|
import { ITTestResourceRequest } from "./lib/index.js";
|
|
3
3
|
import type { IBaseTest, ITestImplementation, ITestSpecification } from "./Types.js";
|
|
4
|
-
import { ITestInterface
|
|
4
|
+
import { ITestInterface } from "./lib/types.js";
|
|
5
5
|
export declare class NodeTesteranto<TestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends Testeranto<TestShape> {
|
|
6
6
|
constructor(input: TestShape["iinput"], testSpecification: ITestSpecification<TestShape>, testImplementation: ITestImplementation<TestShape>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<TestShape>>);
|
|
7
|
-
receiveTestResourceConfig(partialTestResource: string): Promise<
|
|
7
|
+
receiveTestResourceConfig(partialTestResource: string): Promise<{
|
|
8
|
+
features: string[];
|
|
9
|
+
failed: number;
|
|
10
|
+
}>;
|
|
8
11
|
}
|
|
9
|
-
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation:
|
|
12
|
+
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: any, testInterface: INodeTestInterface<ITestShape>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
10
13
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser";
|
|
2
|
+
import { ScreenRecorderOptions } from "puppeteer-core/lib/esm/puppeteer";
|
|
1
3
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
2
4
|
export declare abstract class PM {
|
|
3
5
|
server: any;
|
|
@@ -13,8 +15,9 @@ export declare abstract class PM {
|
|
|
13
15
|
abstract end(accessObject: {
|
|
14
16
|
uid: number;
|
|
15
17
|
}): boolean;
|
|
16
|
-
abstract customScreenShot(opts: object): any;
|
|
17
|
-
abstract screencast(opts:
|
|
18
|
+
abstract customScreenShot(opts: object, page?: string): any;
|
|
19
|
+
abstract screencast(opts: ScreenRecorderOptions, p?: any): any;
|
|
20
|
+
abstract screencastStop(s: string): any;
|
|
18
21
|
abstract page(): string | undefined;
|
|
19
22
|
abstract click(selector: string): any;
|
|
20
23
|
abstract focusOn(selector: string): any;
|
|
@@ -23,4 +26,9 @@ export declare abstract class PM {
|
|
|
23
26
|
abstract getAttribute(selector: string, attribute: string): any;
|
|
24
27
|
abstract isDisabled(selector: string): boolean;
|
|
25
28
|
abstract $(selector: string): any;
|
|
29
|
+
abstract newPage(): CdpPage;
|
|
30
|
+
abstract goto(p: any, url: string): any;
|
|
31
|
+
abstract closePage(p: any): any;
|
|
32
|
+
abstract waitForSelector(p: any, sel: string): any;
|
|
33
|
+
abstract customclose(): any;
|
|
26
34
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
|
+
import { CdpPage, Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
4
5
|
import fs from "fs";
|
|
5
|
-
import { Browser } from "puppeteer-core";
|
|
6
|
+
import { Browser, LaunchOptions } from "puppeteer-core";
|
|
6
7
|
import { PassThrough } from "stream";
|
|
7
8
|
import { IBuiltConfig, ITestTypes } from "../lib/types";
|
|
8
|
-
import { PM } from "./index.js";
|
|
9
9
|
import { ITLog } from "../lib/index.js";
|
|
10
|
+
import { PM } from "./index.js";
|
|
10
11
|
export declare class PM_Main extends PM {
|
|
11
12
|
browser: Browser;
|
|
12
13
|
shutdownMode: boolean;
|
|
@@ -15,9 +16,14 @@ export declare class PM_Main extends PM {
|
|
|
15
16
|
queue: any[];
|
|
16
17
|
registry: Record<string, boolean>;
|
|
17
18
|
constructor(configs: IBuiltConfig);
|
|
19
|
+
customclose(): void;
|
|
20
|
+
waitForSelector(p: string, s: string): any;
|
|
21
|
+
closePage(p: any): any;
|
|
22
|
+
newPage(): CdpPage;
|
|
23
|
+
goto(p: any, url: string): any;
|
|
18
24
|
$(selector: string): boolean;
|
|
19
25
|
screencast(opts: object): void;
|
|
20
|
-
customScreenShot(opts: object): void;
|
|
26
|
+
customScreenShot(opts: object, cdpPage?: CdpPage): void;
|
|
21
27
|
end(accessObject: {
|
|
22
28
|
uid: number;
|
|
23
29
|
}): boolean;
|
|
@@ -36,14 +42,15 @@ export declare class PM_Main extends PM {
|
|
|
36
42
|
getValue(value: string): void;
|
|
37
43
|
getAttribute(selector: string, attribute: string): void;
|
|
38
44
|
isDisabled(selector: string): boolean;
|
|
39
|
-
|
|
45
|
+
screencastStop(s: string): void;
|
|
46
|
+
startPuppeteer(options: LaunchOptions, destfolder: string): Promise<any>;
|
|
40
47
|
shutDown(): void;
|
|
41
48
|
checkForShutdown: () => void;
|
|
42
49
|
register: (src: string) => void;
|
|
43
50
|
deregister: (src: string) => void;
|
|
44
51
|
launchNode: (src: string, dest: string) => Promise<void>;
|
|
45
|
-
launchWebSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<
|
|
52
|
+
launchWebSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<Page>;
|
|
46
53
|
launchNodeSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<void>;
|
|
47
|
-
launchWeb: (t: string, dest: string
|
|
48
|
-
receiveFeatures: (features: string[], destFolder: string) => void;
|
|
54
|
+
launchWeb: (t: string, dest: string) => void;
|
|
55
|
+
receiveFeatures: (features: string[], destFolder: string, srcTest: string) => void;
|
|
49
56
|
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
+
import { ScreencastOptions } from "puppeteer-core";
|
|
3
4
|
import { PassThrough } from "stream";
|
|
4
5
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
5
6
|
import { PM } from "./index.js";
|
|
7
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
6
8
|
declare type PuppetMasterServer = Record<string, Promise<any>>;
|
|
7
9
|
export declare class PM_Node extends PM {
|
|
8
10
|
server: PuppetMasterServer;
|
|
9
11
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
10
12
|
constructor(t: ITTestResourceConfiguration);
|
|
13
|
+
waitForSelector(p: string, s: string): any;
|
|
14
|
+
closePage(p: any): string;
|
|
15
|
+
goto(cdpPage: CdpPage, url: string): any;
|
|
16
|
+
newPage(): CdpPage;
|
|
11
17
|
$(selector: string): boolean;
|
|
12
|
-
screencast(opts: object): void;
|
|
13
18
|
isDisabled(selector: string): boolean;
|
|
14
19
|
getAttribute(selector: string, attribute: string): void;
|
|
15
20
|
getValue(selector: string): void;
|
|
@@ -17,7 +22,9 @@ export declare class PM_Node extends PM {
|
|
|
17
22
|
typeInto(value: string): void;
|
|
18
23
|
page(): any;
|
|
19
24
|
click(selector: string): string | undefined;
|
|
20
|
-
|
|
25
|
+
screencast(opts: ScreencastOptions, page: CdpPage): any;
|
|
26
|
+
screencastStop(p: string): any;
|
|
27
|
+
customScreenShot(opts: ScreencastOptions, cdpPage: CdpPage): any;
|
|
21
28
|
existsSync(destFolder: string): boolean;
|
|
22
29
|
mkdirSync(): any;
|
|
23
30
|
write(writeObject: {
|
|
@@ -3,13 +3,19 @@
|
|
|
3
3
|
import { PassThrough } from "stream";
|
|
4
4
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
5
5
|
import { PM } from "./index.js";
|
|
6
|
-
import { ScreenshotOptions } from "puppeteer-core";
|
|
6
|
+
import { ScreencastOptions, ScreenshotOptions } from "puppeteer-core";
|
|
7
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
7
8
|
declare type PuppetMasterServer = Record<string, Promise<any>>;
|
|
8
9
|
export declare class PM_Web extends PM {
|
|
9
10
|
server: PuppetMasterServer;
|
|
10
11
|
constructor(t: ITTestResourceConfiguration);
|
|
12
|
+
waitForSelector(p: string, s: string): any;
|
|
13
|
+
screencast(opts: ScreencastOptions): any;
|
|
14
|
+
screencastStop(recorder: string): any;
|
|
15
|
+
closePage(p: any): string;
|
|
16
|
+
goto(p: any, url: string): any;
|
|
17
|
+
newPage(): CdpPage;
|
|
11
18
|
$(selector: string): boolean;
|
|
12
|
-
screencast(opts: object): void;
|
|
13
19
|
isDisabled(selector: string): boolean;
|
|
14
20
|
getAttribute(selector: string, attribute: string): any;
|
|
15
21
|
getValue(selector: string): any;
|
|
@@ -19,7 +25,7 @@ export declare class PM_Web extends PM {
|
|
|
19
25
|
click(selector: string): any;
|
|
20
26
|
customScreenShot(opts: ScreenshotOptions): any;
|
|
21
27
|
existsSync(destFolder: string): boolean;
|
|
22
|
-
mkdirSync(): any;
|
|
28
|
+
mkdirSync(x: any): any;
|
|
23
29
|
write(writeObject: {
|
|
24
30
|
uid: number;
|
|
25
31
|
}, contents: string): any;
|
|
@@ -2,5 +2,5 @@ import { IBaseTest, IPartialNodeInterface, ITestImplementation, ITestSpecificati
|
|
|
2
2
|
declare type IInput = string;
|
|
3
3
|
export declare type IImpl<ISpec extends IBaseTest> = ITestImplementation<ISpec>;
|
|
4
4
|
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
5
|
-
declare const _default: <ITestShape extends any>(testInput: IInput, testSpecifications: ISpec<ITestShape>, testImplementations:
|
|
5
|
+
declare const _default: <ITestShape extends any>(testInput: IInput, testSpecifications: ISpec<ITestShape>, testImplementations: any, testInterface?: Partial<import("../Types").INodeTestInterface<ITestShape>> | undefined) => Promise<import("../lib/core.js").default<ITestShape>>;
|
|
6
6
|
export default _default;
|
|
@@ -3,5 +3,5 @@ import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Typ
|
|
|
3
3
|
declare type IInput = typeof React.Component;
|
|
4
4
|
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
5
|
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
-
declare const _default: <ITestShape extends any, IState>(testImplementations:
|
|
6
|
+
declare const _default: <ITestShape extends any, IState>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
7
|
export default _default;
|
|
@@ -3,5 +3,5 @@ import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Typ
|
|
|
3
3
|
declare type IInput = typeof React.Component;
|
|
4
4
|
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
5
|
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
6
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
7
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPartialInterface } from "../../../Types";
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: <ITestShape extends any
|
|
1
|
+
import { IBaseTest, IPartialInterface } from "../../../Types";
|
|
2
|
+
import { ITestSpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest<IInput, number, number, number, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface?: Partial<import("../../../Types").ITestInterface<ITestShape>>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPartialWebInterface } from "../../../Types";
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
2
|
+
import { ITestSpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../Types").IWebTestInterface<ITestShape>>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
3
|
import Stream from "stream";
|
|
4
|
-
import {
|
|
4
|
+
import { ITestSpecification } from "../../../Types";
|
|
5
5
|
declare type IInput = typeof React.Component;
|
|
6
6
|
export declare type IThenShape = any;
|
|
7
7
|
export declare type ISelection = ReactNode;
|
|
8
8
|
export declare type IStore = ReactNode;
|
|
9
9
|
export declare type ISubject = ReactNode;
|
|
10
10
|
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
11
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
11
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
12
12
|
export default _default;
|
|
@@ -7,5 +7,5 @@ export declare type IStore = {
|
|
|
7
7
|
reactElement: any;
|
|
8
8
|
domRoot: ReactDom.Root;
|
|
9
9
|
};
|
|
10
|
-
declare const _default: <ITestShape extends any, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations:
|
|
10
|
+
declare const _default: <ITestShape extends any, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: ITestImplementation<ITestShape, any>, testInterface?: IPartialWebInterface<any>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
11
11
|
export default _default;
|
|
@@ -2,5 +2,5 @@ import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server
|
|
|
2
2
|
import Stream from 'stream';
|
|
3
3
|
import { ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
4
|
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
5
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
5
|
+
declare const _default: <ITestShape extends any>(testImplementations: ITestImplementation<ITestShape, any>, testSpecifications: ITestSpecification<ITestShape>, testInput: ITestShape["iinput"]) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITestSpecification } from "../../../Types";
|
|
2
2
|
import type { IInput } from "./index";
|
|
3
3
|
export declare type ISubject = HTMLElement;
|
|
4
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
4
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ITestSpecification } from "../../../Types";
|
|
3
3
|
declare type IInput = React.MemoExoticComponent<() => JSX.Element>;
|
|
4
|
-
declare const _default: <ITestShape extends any, PropShape>(testImplementations:
|
|
4
|
+
declare const _default: <ITestShape extends any, PropShape>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import renderer from "react-test-renderer";
|
|
2
2
|
import { ISelection, IStore } from ".";
|
|
3
3
|
export declare const testInterface: {
|
|
4
|
-
beforeEach: (CComponent: any, propsAndChildren: any) => Promise<renderer.ReactTestRenderer>;
|
|
4
|
+
beforeEach: (CComponent: any, propsAndChildren: () => any) => Promise<renderer.ReactTestRenderer>;
|
|
5
5
|
andWhen: (renderer: renderer.ReactTestRenderer, whenCB: any) => Promise<renderer.ReactTestRenderer>;
|
|
6
6
|
butThen: (s: IStore, thenCB: any, tr: any) => Promise<ISelection>;
|
|
7
7
|
afterEach: (store: IStore, ndx: any, artificer: any) => Promise<{}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: <ITestShape extends any, IProps, IState>(testImplementations:
|
|
2
|
+
import { ISpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends any, IProps, IState>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: {
|
|
4
4
|
new (props: IProps | Readonly<IProps>): import("react").Component<IProps, IState, any>;
|
|
5
5
|
new (props: IProps, context: any): import("react").Component<IProps, IState, any>;
|
|
6
6
|
contextType?: import("react").Context<any> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: <ITestShape extends any, IProps, IState>(testImplementations:
|
|
1
|
+
import { ISpec, IInput } from "./index.js";
|
|
2
|
+
declare const _default: <ITestShape extends any, IProps, IState>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: IInput<any, any>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
3
3
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ITestSpecification,
|
|
2
|
+
import { ITestSpecification, IBaseTest } from "../../../Types";
|
|
3
3
|
export declare type IInput = React.FC;
|
|
4
4
|
export declare type IWhenShape = unknown;
|
|
5
5
|
export declare type IThenShape = unknown;
|
|
6
6
|
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
7
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
7
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
8
8
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ITestSpecification,
|
|
2
|
+
import { ITestSpecification, IBaseTest } from "../../../Types";
|
|
3
3
|
export declare type IInput = React.FC;
|
|
4
4
|
export declare type IWhenShape = unknown;
|
|
5
5
|
export declare type IThenShape = unknown;
|
|
6
6
|
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
7
|
-
declare const _default: <ITestShape extends any, IPropShape>(testImplementations:
|
|
7
|
+
declare const _default: <ITestShape extends any, IPropShape>(testImplementations: any, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
8
8
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IBaseTest } from "../../../Types";
|
|
2
|
+
import type { ITestSpec } from "../jsx-promised";
|
|
2
3
|
import { IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends any
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
4
5
|
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
5
6
|
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
7
|
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITestSpec } from "../jsx-promised";
|
|
2
2
|
import { IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
3
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
4
4
|
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
5
5
|
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
6
|
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IInput } from ".";
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
2
|
+
import { ITestSpec } from "../../react/jsx";
|
|
3
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITestSpec } from "../../react/jsx";
|
|
2
2
|
import { IInput } from "./index";
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations:
|
|
3
|
+
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,39 +1,63 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITTestResourceConfiguration, ITestArtificer, ITestCheckCallback } from "./lib/index.js";
|
|
2
2
|
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen, BaseGiven } from "./lib/abstractBase.js";
|
|
3
|
-
import Testeranto from "./lib/core.js";
|
|
4
|
-
import { INodeTestInterface, ITestInterface, IWebTestInterface } from "./lib/types.js";
|
|
5
3
|
import { PM } from "./PM/index.js";
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
4
|
+
export declare type IWebTestInterface<ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = {
|
|
5
|
+
assertThis: (x: ITestShape["then"]) => void;
|
|
6
|
+
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration, utils: PM) => Promise<ITestShape["istore"]>;
|
|
7
|
+
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration, utils: PM) => Promise<ITestShape["iselection"]>;
|
|
8
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, utils: PM) => any;
|
|
9
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils: PM) => Promise<unknown>;
|
|
10
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils: PM) => Promise<ITestShape["isubject"]>;
|
|
11
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, utils: PM) => Promise<ITestShape["istore"]>;
|
|
12
|
+
};
|
|
13
|
+
export declare type INodeTestInterface<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = {
|
|
14
|
+
assertThis: (x: I["then"]) => void;
|
|
15
|
+
andWhen: (store: I["istore"], whenCB: I["when"], testResource: ITTestResourceConfiguration, utils: PM) => Promise<I["istore"]>;
|
|
16
|
+
butThen: (store: I["istore"], thenCB: any, testResource: ITTestResourceConfiguration, utils: PM) => Promise<I["iselection"]>;
|
|
17
|
+
afterAll: (store: I["istore"], artificer: ITestArtificer, pm: PM) => any;
|
|
18
|
+
afterEach: (store: I["istore"], key: string, artificer: ITestArtificer, pm: PM) => Promise<unknown>;
|
|
19
|
+
beforeAll: (input: I["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, pm: PM) => Promise<I["isubject"]>;
|
|
20
|
+
beforeEach: (subject: I["isubject"], initializer: (c?: any) => I["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, pm: PM) => Promise<I["istore"]>;
|
|
21
|
+
};
|
|
22
|
+
export declare type ITestInterface<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = {
|
|
23
|
+
assertThis: (x: I["then"]) => void;
|
|
24
|
+
andWhen: (store: I["istore"], whenCB: I["when"], testResource: ITTestResourceConfiguration, pm: PM) => Promise<I["istore"]>;
|
|
25
|
+
butThen: (store: I["istore"], thenCB: I["then"], testResource: ITTestResourceConfiguration, pm: PM) => Promise<I["iselection"]>;
|
|
26
|
+
afterAll: (store: I["istore"], artificer: ITestArtificer, pm: PM) => any;
|
|
27
|
+
afterEach: (store: I["istore"], key: string, artificer: ITestArtificer, pm: PM) => Promise<unknown>;
|
|
28
|
+
beforeAll: (input: I["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, pm: PM) => Promise<I["isubject"]>;
|
|
29
|
+
beforeEach: (subject: I["isubject"], initializer: (c?: any) => I["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, pm: PM) => Promise<I["istore"]>;
|
|
30
|
+
};
|
|
31
|
+
export declare type IPartialInterface<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = Partial<ITestInterface<I>>;
|
|
32
|
+
export declare type IPartialNodeInterface<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = Partial<INodeTestInterface<I>>;
|
|
8
33
|
export declare type IPartialWebInterface<I extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = Partial<IWebTestInterface<I>>;
|
|
9
|
-
export declare type
|
|
10
|
-
|
|
11
|
-
[K in keyof ITestShape["suites"]]: (name: string, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
34
|
+
export declare type ITestSpecification<I extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = (Suite: {
|
|
35
|
+
[K in keyof I["suites"]]: (name: string, givens: IGivens<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>, checks: BaseCheck<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>[]) => BaseSuite<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
12
36
|
}, Given: {
|
|
13
|
-
[K in keyof
|
|
37
|
+
[K in keyof I["givens"]]: (features: string[], whens: BaseWhen<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>[], thens: BaseThen<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>[], ...xtrasB: I["givens"][K]) => BaseGiven<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
14
38
|
}, When: {
|
|
15
|
-
[K in keyof
|
|
39
|
+
[K in keyof I["whens"]]: (...xtrasC: I["whens"][K]) => BaseWhen<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
16
40
|
}, Then: {
|
|
17
|
-
[K in keyof
|
|
18
|
-
}, Check: ITestCheckCallback<
|
|
19
|
-
export declare type ITestImplementation<
|
|
41
|
+
[K in keyof I["thens"]]: (...xtrasD: I["thens"][K]) => BaseThen<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
42
|
+
}, Check: ITestCheckCallback<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>) => any[];
|
|
43
|
+
export declare type ITestImplementation<IN extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, OUT extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = {
|
|
20
44
|
suites: {
|
|
21
|
-
[K in keyof
|
|
45
|
+
[K in keyof OUT["suites"]]: string;
|
|
22
46
|
};
|
|
23
47
|
givens: {
|
|
24
|
-
[K in keyof
|
|
48
|
+
[K in keyof OUT["givens"]]: (...Ig: OUT["givens"][K]) => IN["given"];
|
|
25
49
|
};
|
|
26
50
|
whens: {
|
|
27
|
-
[K in keyof
|
|
51
|
+
[K in keyof OUT["whens"]]: (...Iw: OUT["whens"][K]) => (zel: IN["iselection"], utils: PM) => Promise<IN["when"]>;
|
|
28
52
|
};
|
|
29
53
|
thens: {
|
|
30
|
-
[K in keyof
|
|
54
|
+
[K in keyof OUT["thens"]]: (...It: OUT["thens"][K]) => (ssel: IN["iselection"], utils: PM) => IN["then"];
|
|
31
55
|
};
|
|
32
56
|
checks: {
|
|
33
|
-
[K in keyof
|
|
57
|
+
[K in keyof OUT["checks"]]: (...Ic: OUT["checks"][K]) => IN["given"];
|
|
34
58
|
};
|
|
35
|
-
}
|
|
36
|
-
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
59
|
+
};
|
|
60
|
+
export declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
37
61
|
export declare type IBaseTest<IInput, ISubject, IStore, ISelection, IGiven, IWhen, IThen, ISuites extends Record<string, any>, IGivens extends Record<string, any>, IWhens extends Record<string, any>, IThens extends Record<string, any>, IChecks extends Record<string, any>> = {
|
|
38
62
|
iinput: IInput;
|
|
39
63
|
isubject: ISubject;
|
|
@@ -48,4 +72,19 @@ export declare type IBaseTest<IInput, ISubject, IStore, ISelection, IGiven, IWhe
|
|
|
48
72
|
thens: IThens;
|
|
49
73
|
checks: IChecks;
|
|
50
74
|
};
|
|
51
|
-
export {
|
|
75
|
+
export declare type Ibdd_out<ISuites extends Record<string, any>, IGivens extends Record<string, any>, IWhens extends Record<string, any>, IThens extends Record<string, any>, IChecks extends Record<string, any>> = {
|
|
76
|
+
suites: ISuites;
|
|
77
|
+
givens: IGivens;
|
|
78
|
+
whens: IWhens;
|
|
79
|
+
thens: IThens;
|
|
80
|
+
checks: IChecks;
|
|
81
|
+
};
|
|
82
|
+
export declare type Ibdd_in<IInput, ISubject, IStore, ISelection, IGiven, IWhen, IThen> = {
|
|
83
|
+
iinput: IInput;
|
|
84
|
+
isubject: ISubject;
|
|
85
|
+
istore: IStore;
|
|
86
|
+
iselection: ISelection;
|
|
87
|
+
given: IGiven;
|
|
88
|
+
when: IWhen;
|
|
89
|
+
then: IThen;
|
|
90
|
+
};
|
package/dist/types/src/Web.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IBaseTest, ITestImplementation, ITestSpecification } from "./Types";
|
|
2
2
|
import Testeranto from "./lib/core.js";
|
|
3
3
|
import { ITTestResourceRequest } from "./lib/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { IFinalResults, ITestInterface } from "./lib/types";
|
|
5
5
|
export declare class WebTesteranto<TestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends Testeranto<TestShape> {
|
|
6
6
|
constructor(input: TestShape["iinput"], testSpecification: ITestSpecification<TestShape>, testImplementation: ITestImplementation<TestShape>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<TestShape>>);
|
|
7
|
-
receiveTestResourceConfig(partialTestResource: any): Promise<
|
|
7
|
+
receiveTestResourceConfig(partialTestResource: any): Promise<IFinalResults>;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation:
|
|
9
|
+
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: any, testInterface: IWebTestInterface<ITestShape>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
10
10
|
export default _default;
|
|
@@ -15,6 +15,7 @@ export declare abstract class BaseSuite<ITestShape extends IBaseTest<unknown, un
|
|
|
15
15
|
toObj(): {
|
|
16
16
|
name: string;
|
|
17
17
|
givens: {
|
|
18
|
+
key: string;
|
|
18
19
|
name: string;
|
|
19
20
|
whens: {
|
|
20
21
|
name: string;
|
|
@@ -46,9 +47,11 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest<unknown, un
|
|
|
46
47
|
recommendedFsPath: string;
|
|
47
48
|
givenCB: ITestShape["given"];
|
|
48
49
|
initialValues: any;
|
|
50
|
+
key: string;
|
|
49
51
|
constructor(name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], givenCB: ITestShape["given"], initialValues: any);
|
|
50
|
-
beforeAll(store: ITestShape["istore"], artifactory:
|
|
52
|
+
beforeAll(store: ITestShape["istore"], initializer: any, artifactory: any, testResource: any, initialValues: any, pm: any): ITestShape["istore"];
|
|
51
53
|
toObj(): {
|
|
54
|
+
key: string;
|
|
52
55
|
name: string;
|
|
53
56
|
whens: {
|
|
54
57
|
name: string;
|
|
@@ -61,8 +64,9 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest<unknown, un
|
|
|
61
64
|
error: (string | Error | undefined)[] | null;
|
|
62
65
|
features: string[];
|
|
63
66
|
};
|
|
64
|
-
abstract givenThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: ITestShape["given"], pm: PM): Promise<ITestShape["istore"]>;
|
|
67
|
+
abstract givenThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: ITestShape["given"], initialValues: any, pm: PM): Promise<ITestShape["istore"]>;
|
|
65
68
|
afterEach(store: ITestShape["istore"], key: string, artifactory: ITestArtifactory, pm: PM): Promise<unknown>;
|
|
69
|
+
abstract uberCatcher(e: any): any;
|
|
66
70
|
give(subject: ITestShape["isubject"], key: string, testResourceConfiguration: ITTestResourceConfiguration, tester: (t: Awaited<ITestShape["then"]> | undefined) => boolean, artifactory: ITestArtifactory, tLog: ITLog, pm: PM, suiteNdx: number): Promise<ITestShape["istore"]>;
|
|
67
71
|
}
|
|
68
72
|
export declare abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IBaseTest, ITestSpecification, ITestImplementation } from "../Types.js";
|
|
2
|
-
import { ITestInterface } from "./types.js";
|
|
2
|
+
import { IFinalResults, ITestInterface } from "./types.js";
|
|
3
3
|
import { ITTestResourceRequest } from "./index.js";
|
|
4
4
|
import { ClassBuilder } from "./classBuilder.js";
|
|
5
5
|
export default abstract class Testeranto<ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends ClassBuilder<ITestShape> {
|
|
6
|
-
constructor(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape>, testResourceRequirement: ITTestResourceRequest | undefined, testInterface: Partial<ITestInterface<ITestShape
|
|
7
|
-
abstract receiveTestResourceConfig(partialTestResource: string): Promise<
|
|
6
|
+
constructor(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape>, testResourceRequirement: ITTestResourceRequest | undefined, testInterface: Partial<ITestInterface<ITestShape>>, uberCatcher: (cb: any) => void);
|
|
7
|
+
abstract receiveTestResourceConfig(partialTestResource: string): Promise<IFinalResults>;
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ import { IBaseTest } from "../Types.js";
|
|
|
3
3
|
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen } from "./abstractBase.js";
|
|
4
4
|
import { ITestInterface } from "./types.js";
|
|
5
5
|
export declare const BaseTestInterface: ITestInterface<IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
6
|
-
export declare const DefaultTestInterface: (p:
|
|
6
|
+
export declare const DefaultTestInterface: (p: ITestInterface<any>) => ITestInterface<any>;
|
|
7
7
|
export declare type ITTestResourceConfiguration = {
|
|
8
8
|
name: string;
|
|
9
9
|
fs: string;
|