testeranto 0.49.9 → 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 +6 -27
- 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 +5 -26
- 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 → SubPackages}/react-dom/jsx/index.d.ts +3 -3
- 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 +3 -5
- package/src/SubPackages/react-dom/jsx/node.ts +68 -0
- package/src/{subPackages → SubPackages}/react-dom/jsx/web.ts +19 -62
- 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 -146
- 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/Features.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Graph from "graphology";
|
|
1
|
+
import Graph from "graphology/dist/graphology.umd.js";
|
|
2
2
|
declare const DirectedGraph: any;
|
|
3
3
|
declare abstract class TesterantoGraph {
|
|
4
4
|
name: string;
|
|
@@ -44,19 +44,19 @@ export declare class TesterantoFeatures {
|
|
|
44
44
|
features: {
|
|
45
45
|
inNetworks: {
|
|
46
46
|
network: string;
|
|
47
|
-
neighbors:
|
|
47
|
+
neighbors: any;
|
|
48
48
|
}[];
|
|
49
49
|
name: string;
|
|
50
50
|
}[];
|
|
51
51
|
networks: ({
|
|
52
52
|
name: string;
|
|
53
|
-
graph: Graph
|
|
53
|
+
graph: Graph;
|
|
54
54
|
} | {
|
|
55
55
|
name: string;
|
|
56
|
-
graph: Graph
|
|
56
|
+
graph: Graph;
|
|
57
57
|
} | {
|
|
58
58
|
name: string;
|
|
59
|
-
graph: Graph
|
|
59
|
+
graph: Graph;
|
|
60
60
|
})[];
|
|
61
61
|
};
|
|
62
62
|
}
|
package/dist/types/Node.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
butThen?: ((store: IStore, callback: any, testResource: ITTestResourceConfiguration) => Promise<ISelection>) | undefined;
|
|
6
|
-
assertioner?: ((t: IThenShape) => any) | undefined;
|
|
7
|
-
afterAll?: ((store: IStore, artificer: ITestArtificer) => any) | undefined;
|
|
8
|
-
afterEach?: ((store: IStore, key: string, artificer: ITestArtificer) => Promise<unknown>) | undefined;
|
|
9
|
-
beforeAll?: ((input: IInput, artificer: ITestArtificer) => Promise<ISubject>) | undefined;
|
|
10
|
-
beforeEach?: ((subject: ISubject, initialValues: any, testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<IStore>) | undefined;
|
|
11
|
-
}, testResourceRequirement?: ITTestResourceRequest) => Promise<void>;
|
|
1
|
+
import Testeranto from "./lib/core.js";
|
|
2
|
+
import { ITTestResourceRequest } from "./lib/index.js";
|
|
3
|
+
import type { IBaseTest, INodeTestInterface, ITestImplementation, ITestSpecification } from "./Types.js";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: Partial<INodeTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
12
5
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ILogWriter } from "./
|
|
1
|
+
import { ILogWriter } from "./lib/index.js";
|
|
2
2
|
export declare const NodeWriter: ILogWriter;
|
package/dist/types/Project.d.ts
CHANGED
|
@@ -1,33 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TesterantoFeatures } from "./Features";
|
|
3
|
-
import { IBaseConfig, IRunTime, ITestTypes } from "./Types";
|
|
4
|
-
import { ITTestResourceRequirement } from './core';
|
|
5
|
-
declare type ISchedulerProtocols = `ipc` | `ws`;
|
|
1
|
+
import { IBaseConfig, IRunTime } from "./Types";
|
|
6
2
|
export declare class ITProject {
|
|
7
|
-
|
|
8
|
-
devMode: boolean;
|
|
9
|
-
exitCodes: Record<number, string>;
|
|
10
|
-
features: TesterantoFeatures;
|
|
3
|
+
config: IBaseConfig;
|
|
11
4
|
mode: `up` | `down`;
|
|
12
|
-
ports: Record<string, string>;
|
|
13
|
-
tests: ITestTypes[];
|
|
14
|
-
websockets: Record<string, WebSocket>;
|
|
15
|
-
resourceQueue: {
|
|
16
|
-
requirement: ITTestResourceRequirement;
|
|
17
|
-
protocol: ISchedulerProtocols;
|
|
18
|
-
}[];
|
|
19
|
-
private spinCycle;
|
|
20
|
-
private spinAnimation;
|
|
21
5
|
constructor(config: IBaseConfig);
|
|
22
|
-
requestResource(requirement: ITTestResourceRequirement, protocol: ISchedulerProtocols): void;
|
|
23
6
|
getSecondaryEndpointsPoints(runtime?: IRunTime): string[];
|
|
24
7
|
initiateShutdown(reason: string): void;
|
|
25
|
-
private shutdown;
|
|
26
|
-
private spinner;
|
|
27
|
-
private releaseTestResourceWs;
|
|
28
|
-
private releaseTestResourcePm2;
|
|
29
|
-
private allocateViaWs;
|
|
30
|
-
private allocateViaIpc;
|
|
31
|
-
private mainLoop;
|
|
32
8
|
}
|
|
33
|
-
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IBaseTest, IPartialInterface, ITestImplementation, ITestSpecification } from "../Types";
|
|
2
|
+
declare type IInput = string;
|
|
3
|
+
export declare type IImpl<ISpec extends IBaseTest> = ITestImplementation<ISpec, object>;
|
|
4
|
+
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest>(testInput: IInput, testSpecifications: ISpec<ITestShape>, testImplementations: ITestImplementation<ITestShape, object>, testInterface?: Partial<import("../Types").ITestInterface<ITestShape>> | undefined) => Promise<import("../lib/core.js").default<ITestShape>>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
+
declare type IInput = typeof React.Component;
|
|
4
|
+
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
|
+
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
+
declare const _default: <ITestShape extends IBaseTest, IState>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
+
declare type IInput = typeof React.Component;
|
|
4
|
+
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
|
+
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CElement } from "react";
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
+
export declare type IWhenShape = any;
|
|
4
|
+
export declare type IThenShape = any;
|
|
5
|
+
export declare type InitialState = unknown;
|
|
6
|
+
export declare type IInput = () => JSX.Element;
|
|
7
|
+
export declare type ISelection = CElement<any, any>;
|
|
8
|
+
export declare type IStore = CElement<any, any>;
|
|
9
|
+
export declare type ISubject = CElement<any, any>;
|
|
10
|
+
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape, object>;
|
|
11
|
+
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
|
+
export declare const testInterface: {
|
|
13
|
+
beforeEach: (x: any, ndx: any, testRsource: any, artificer: any) => Promise<IStore>;
|
|
14
|
+
andWhen: (s: IStore, whenCB: any) => Promise<ISelection>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IBaseTest, IPartialInterface } from "../../../Types";
|
|
2
|
+
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../Types").ITestInterface<ITestShape>>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IBaseTest, IPartialInterface } from "../../../Types";
|
|
2
|
+
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../Types").ITestInterface<ITestShape>>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
|
+
export default _default;
|
|
@@ -1,14 +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 { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
5
5
|
declare type IInput = typeof React.Component;
|
|
6
|
-
declare type InitialState = unknown;
|
|
7
|
-
declare type IWhenShape = any;
|
|
8
6
|
export declare type IThenShape = any;
|
|
9
7
|
export declare type ISelection = ReactNode;
|
|
10
8
|
export declare type IStore = ReactNode;
|
|
11
9
|
export declare type ISubject = ReactNode;
|
|
12
10
|
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
13
|
-
declare const _default: <ITestShape extends
|
|
11
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
14
12
|
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
+
declare type IInput = typeof React.Component;
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any) => void;
|
|
5
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare type IInput = () => JSX.Element;
|
|
1
|
+
export declare type IInput = (props?: any) => JSX.Element;
|
|
2
2
|
export declare type IState = unknown;
|
|
3
|
-
export declare type IWhenShape = any;
|
|
4
|
-
export declare type IThenShape = any;
|
|
5
3
|
export declare type ISelection = HTMLElement;
|
|
6
4
|
export declare type IStore = HTMLElement;
|
|
5
|
+
export declare type IWhenShape = any;
|
|
6
|
+
export declare type IThenShape = any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
2
|
+
import Stream from 'stream';
|
|
3
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
|
+
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: ITestShape["iinput"]) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
2
|
+
import type { IInput } from "./index";
|
|
3
|
+
export declare type ISubject = HTMLElement;
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => void;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
+
declare type IInput = React.MemoExoticComponent<() => JSX.Element>;
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest, PropShape>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer from "react-test-renderer";
|
|
3
|
-
import {
|
|
3
|
+
import type { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
4
|
export declare type ISuper<T> = T extends infer U ? U : object;
|
|
5
5
|
export declare type IInput<P, S> = typeof React.Component<P, S>;
|
|
6
6
|
export declare type InitialState = unknown;
|
|
@@ -9,12 +9,12 @@ export declare type IThenShape = any;
|
|
|
9
9
|
export declare type ISelection = renderer.ReactTestRenderer;
|
|
10
10
|
export declare type IStore = renderer.ReactTestRenderer;
|
|
11
11
|
export declare type ISubject = renderer.ReactTestRenderer;
|
|
12
|
-
export declare type IImpl<ITestShape extends
|
|
13
|
-
export declare type ISpec<ITestShape extends
|
|
12
|
+
export declare type IImpl<ITestShape extends IBaseTest, IProps> = ITestImplementation<ITestShape, object>;
|
|
13
|
+
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
14
14
|
export declare const testInterface: {
|
|
15
|
-
beforeEach: (CComponent: any,
|
|
16
|
-
andWhen: (renderer: renderer.ReactTestRenderer,
|
|
17
|
-
butThen: (s: IStore) => Promise<ISelection>;
|
|
15
|
+
beforeEach: (CComponent: any, propsAndChildren: any) => Promise<renderer.ReactTestRenderer>;
|
|
16
|
+
andWhen: (renderer: renderer.ReactTestRenderer, whenCB: any) => Promise<renderer.ReactTestRenderer>;
|
|
17
|
+
butThen: (s: IStore, thenCB: any, tr: any) => Promise<ISelection>;
|
|
18
18
|
afterEach: (store: IStore, ndx: any, artificer: any) => Promise<{}>;
|
|
19
19
|
afterAll: (store: IStore, artificer: any) => void;
|
|
20
20
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IBaseTest } from "../../../Types";
|
|
3
|
+
import { IImpl, ISpec, IInput } from "./index.js";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest, IProps, IState>(testImplementations: IImpl<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: {
|
|
5
|
+
new (props: IProps | Readonly<IProps>): import("react").Component<IProps, IState, any>;
|
|
6
|
+
new (props: IProps, context: any): import("react").Component<IProps, IState, any>;
|
|
7
|
+
contextType?: import("react").Context<any> | undefined;
|
|
8
|
+
}) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IBaseTest } from "../../../Types";
|
|
2
|
+
import { IImpl, ISpec, IInput } from "./index.js";
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest, IProps, IState>(testImplementations: IImpl<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput<any, any>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ITestSpecification, ITestImplementation, IBaseTest } from "../../../Types";
|
|
3
|
+
export declare type IInput = React.FC;
|
|
4
|
+
export declare type IWhenShape = unknown;
|
|
5
|
+
export declare type IThenShape = unknown;
|
|
6
|
+
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
7
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ITestSpecification, ITestImplementation, IBaseTest } from "../../../Types";
|
|
3
|
+
export declare type IInput = React.FC;
|
|
4
|
+
export declare type IWhenShape = unknown;
|
|
5
|
+
export declare type IThenShape = unknown;
|
|
6
|
+
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
7
|
+
declare const _default: <ITestShape extends IBaseTest, IPropShape>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
8
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import renderer from "react-test-renderer";
|
|
2
|
-
import {
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
3
|
export declare type IWhenShape = any;
|
|
4
4
|
export declare type IThenShape = any;
|
|
5
5
|
export declare type InitialState = unknown;
|
|
@@ -7,9 +7,10 @@ export declare type IInput = (props?: any) => JSX.Element;
|
|
|
7
7
|
export declare type ISelection = renderer.ReactTestRenderer;
|
|
8
8
|
export declare type IStore = renderer.ReactTestRenderer;
|
|
9
9
|
export declare type ISubject = renderer.ReactTestRenderer;
|
|
10
|
-
export declare type ITestImpl<ITestShape extends
|
|
11
|
-
export declare type ITestSpec<ITestShape extends
|
|
10
|
+
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape, object>;
|
|
11
|
+
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
12
|
export declare const testInterface: {
|
|
13
|
+
butThen: (s: IStore, thenCB: any, tr: any) => Promise<ISelection>;
|
|
13
14
|
beforeEach: (CComponent: any, props: any) => Promise<renderer.ReactTestRenderer>;
|
|
14
|
-
andWhen: (renderer: renderer.ReactTestRenderer,
|
|
15
|
+
andWhen: (renderer: renderer.ReactTestRenderer, whenCB: (any: any) => any) => Promise<renderer.ReactTestRenderer>;
|
|
15
16
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBaseTest } from "../../../Types";
|
|
2
|
+
import type { ITestImpl, ITestSpec } from "../jsx-promised";
|
|
3
|
+
import { IInput } from "./index.js";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
5
|
+
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
|
+
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
7
|
+
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
8
|
+
}) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IInput } from "./index.js";
|
|
2
|
+
import { IBaseTest } from "../../../Types";
|
|
3
|
+
import { ITestImpl, ITestSpec } from "../jsx-promised";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
5
|
+
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
|
+
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
7
|
+
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
8
|
+
}) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
9
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import renderer from "react-test-renderer";
|
|
2
|
-
import {
|
|
2
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
3
|
export declare type IWhenShape = any;
|
|
4
4
|
export declare type IThenShape = any;
|
|
5
5
|
export declare type InitialState = unknown;
|
|
@@ -7,9 +7,9 @@ export declare type IInput = Promise<JSX.Element>;
|
|
|
7
7
|
export declare type ISelection = renderer.ReactTestRenderer;
|
|
8
8
|
export declare type IStore = renderer.ReactTestRenderer;
|
|
9
9
|
export declare type ISubject = renderer.ReactTestRenderer;
|
|
10
|
-
export declare type ITestImpl<ITestShape extends
|
|
11
|
-
export declare type ITestSpec<ITestShape extends
|
|
10
|
+
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape, object>;
|
|
11
|
+
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
12
|
export declare const testInterface: {
|
|
13
13
|
beforeEach: (CComponent: any) => Promise<renderer.ReactTestRenderer>;
|
|
14
|
-
andWhen: (renderer: renderer.ReactTestRenderer,
|
|
14
|
+
andWhen: (renderer: renderer.ReactTestRenderer, whenCB: () => (any: any) => any) => Promise<renderer.ReactTestRenderer>;
|
|
15
15
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IInput } from ".";
|
|
2
|
+
import { IBaseTest } from "../../../Types";
|
|
3
|
+
import { ITestImpl, ITestSpec } from "../../react/jsx";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IBaseTest } from "../../../Types";
|
|
2
|
+
import { ITestImpl, ITestSpec } from "../../react/jsx";
|
|
3
|
+
import { IInput } from "./index";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
|
+
export default _default;
|
package/dist/types/Types.d.ts
CHANGED
|
@@ -1,18 +1,131 @@
|
|
|
1
|
+
import { BrowserWindow } from "electron";
|
|
2
|
+
import { Page, Browser } from "puppeteer-core";
|
|
3
|
+
import { ITTestResourceConfiguration, ITTestResourceRequest, ITestArtificer, ITestCheckCallback } from "./lib/index.js";
|
|
4
|
+
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen, BaseGiven } from "./lib/abstractBase.js";
|
|
5
|
+
import Testeranto from "./lib/core.js";
|
|
6
|
+
export declare type IBuiltConfig = {
|
|
7
|
+
buildDir: string;
|
|
8
|
+
modules: {
|
|
9
|
+
module: unknown;
|
|
10
|
+
test: string;
|
|
11
|
+
runtime: IRunTime;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
export declare type INodeUtils = TBrowser;
|
|
15
|
+
export declare type IWebUtils = BrowserWindow;
|
|
16
|
+
export declare type IUtils = INodeUtils | IWebUtils;
|
|
17
|
+
export declare type ISuiteKlasser<ITestShape extends IBaseTest> = (name: string, index: number, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
18
|
+
export declare type IGivenKlasser<ITestShape extends IBaseTest> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<ITestShape>;
|
|
19
|
+
export declare type IWhenKlasser<ITestShape extends IBaseTest> = (s: any, o: any) => BaseWhen<ITestShape>;
|
|
20
|
+
export declare type IThenKlasser<ITestShape extends IBaseTest> = (s: any, o: any) => BaseThen<ITestShape>;
|
|
21
|
+
export declare type ICheckKlasser<ITestShape extends IBaseTest> = (n: any, f: any, cb: any, w: any, t: any) => BaseCheck<ITestShape>;
|
|
22
|
+
export declare class TBrowser {
|
|
23
|
+
browser: Browser;
|
|
24
|
+
constructor(browser: Browser);
|
|
25
|
+
pages(): Promise<Page[]>;
|
|
26
|
+
}
|
|
27
|
+
export declare type ITTestShape = {
|
|
28
|
+
suites: any;
|
|
29
|
+
givens: any;
|
|
30
|
+
whens: any;
|
|
31
|
+
thens: any;
|
|
32
|
+
checks: any;
|
|
33
|
+
};
|
|
34
|
+
export declare type IJsonConfig = {
|
|
35
|
+
outdir: string;
|
|
36
|
+
tests: ITestTypes[];
|
|
37
|
+
features: string;
|
|
38
|
+
};
|
|
1
39
|
export declare type IBaseConfig = {
|
|
40
|
+
outdir: string;
|
|
41
|
+
tests: ITestTypes[];
|
|
42
|
+
features: string;
|
|
43
|
+
externals: string[];
|
|
2
44
|
clearScreen: boolean;
|
|
3
45
|
devMode: boolean;
|
|
4
|
-
features: string;
|
|
5
46
|
webPlugins: any[];
|
|
6
47
|
nodePlugins: any[];
|
|
7
48
|
minify: boolean;
|
|
8
49
|
outbase: string;
|
|
9
|
-
outdir: string;
|
|
10
50
|
ports: string[];
|
|
11
|
-
|
|
51
|
+
debugger: boolean;
|
|
12
52
|
};
|
|
53
|
+
export declare type IPartialInterface<I extends IBaseTest> = Partial<ITestInterface<I>>;
|
|
54
|
+
export declare type IPartialNodeInterface<I extends IBaseTest> = Partial<INodeTestInterface<I>>;
|
|
55
|
+
export declare type IEntry<ITestShape extends IBaseTest> = (input: ITestShape['iinput'], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: IPartialInterface<ITestShape>, testResourceRequirement: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
13
56
|
export declare type IRunTime = `node` | `web`;
|
|
14
57
|
export declare type ITestTypes = [
|
|
15
58
|
string,
|
|
16
59
|
IRunTime,
|
|
17
60
|
ITestTypes[]
|
|
18
61
|
];
|
|
62
|
+
export declare type ITestSpecification<ITestShape extends IBaseTest> = (Suite: {
|
|
63
|
+
[K in keyof ITestShape["suites"]]: (name: string, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
64
|
+
}, Given: {
|
|
65
|
+
[K in keyof ITestShape["givens"]]: (features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], ...xtrasB: ITestShape["givens"][K]) => BaseGiven<ITestShape>;
|
|
66
|
+
}, When: {
|
|
67
|
+
[K in keyof ITestShape["whens"]]: (...xtrasC: ITestShape["whens"][K]) => BaseWhen<ITestShape>;
|
|
68
|
+
}, Then: {
|
|
69
|
+
[K in keyof ITestShape["thens"]]: (...xtrasD: ITestShape["thens"][K]) => BaseThen<ITestShape>;
|
|
70
|
+
}, Check: ITestCheckCallback<ITestShape>) => any[];
|
|
71
|
+
export declare type ITestImplementation<ITestShape extends IBaseTest, IMod> = Modify<{
|
|
72
|
+
suites: {
|
|
73
|
+
[K in keyof ITestShape["suites"]]: string;
|
|
74
|
+
};
|
|
75
|
+
givens: {
|
|
76
|
+
[K in keyof ITestShape["givens"]]: (...Ig: ITestShape["givens"][K]) => ITestShape['given'];
|
|
77
|
+
};
|
|
78
|
+
whens: {
|
|
79
|
+
[K in keyof ITestShape["whens"]]: (...Iw: ITestShape["whens"][K]) => (zel: ITestShape['iselection']) => ITestShape['when'];
|
|
80
|
+
};
|
|
81
|
+
thens: {
|
|
82
|
+
[K in keyof ITestShape["thens"]]: (...It: ITestShape["thens"][K]) => (ssel: ITestShape['iselection']) => ITestShape['then'];
|
|
83
|
+
};
|
|
84
|
+
checks: {
|
|
85
|
+
[K in keyof ITestShape["checks"]]: (...Ic: ITestShape["checks"][K]) => ITestShape['given'];
|
|
86
|
+
};
|
|
87
|
+
}, IMod>;
|
|
88
|
+
export declare type ITestInterface<ITestShape extends IBaseTest> = {
|
|
89
|
+
assertThis: (x: ITestShape['then']) => void;
|
|
90
|
+
andWhen: (store: ITestShape['istore'], whenCB: ITestShape['when'], testResource: ITTestResourceConfiguration) => Promise<ITestShape['istore']>;
|
|
91
|
+
butThen: (store: ITestShape['istore'], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape['iselection']>;
|
|
92
|
+
afterAll: (store: ITestShape['istore'], artificer: ITestArtificer, utils: IUtils) => any;
|
|
93
|
+
afterEach: (store: ITestShape['istore'], key: string, artificer: ITestArtificer) => Promise<unknown>;
|
|
94
|
+
beforeAll: (input: ITestShape['iinput'], testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<ITestShape['isubject']>;
|
|
95
|
+
beforeEach: (subject: ITestShape['isubject'], initializer: (c?: any) => ITestShape['given'], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape['istore']>;
|
|
96
|
+
};
|
|
97
|
+
export declare type INodeTestInterface<ITestShape extends IBaseTest> = {
|
|
98
|
+
assertThis: (x: ITestShape['then']) => void;
|
|
99
|
+
andWhen: (store: ITestShape['istore'], whenCB: ITestShape['when'], testResource: ITTestResourceConfiguration) => Promise<ITestShape['istore']>;
|
|
100
|
+
butThen: (store: ITestShape['istore'], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape['iselection']>;
|
|
101
|
+
afterAll: (store: ITestShape['istore'], artificer: ITestArtificer, browser: INodeUtils) => any;
|
|
102
|
+
afterEach: (store: ITestShape['istore'], key: string, artificer: ITestArtificer) => Promise<unknown>;
|
|
103
|
+
beforeAll: (input: ITestShape['iinput'], testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<ITestShape['isubject']>;
|
|
104
|
+
beforeEach: (subject: ITestShape['isubject'], initializer: (c?: any) => ITestShape['given'], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape['istore']>;
|
|
105
|
+
} & ITestInterface<ITestShape>;
|
|
106
|
+
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
107
|
+
export declare type IBaseTest = {
|
|
108
|
+
iinput: any;
|
|
109
|
+
isubject: any;
|
|
110
|
+
istore: any;
|
|
111
|
+
iselection: any;
|
|
112
|
+
given: any;
|
|
113
|
+
when: any;
|
|
114
|
+
then: any;
|
|
115
|
+
suites: Record<string, any[]>;
|
|
116
|
+
givens: Record<string, any[]>;
|
|
117
|
+
whens: Record<string, any[]>;
|
|
118
|
+
thens: Record<string, any[]>;
|
|
119
|
+
checks: Record<string, any[]>;
|
|
120
|
+
};
|
|
121
|
+
export declare type ITestShaper<T extends IBaseTest, modifier> = {
|
|
122
|
+
given: any;
|
|
123
|
+
when: any;
|
|
124
|
+
then: any;
|
|
125
|
+
suites: any;
|
|
126
|
+
givens: any;
|
|
127
|
+
whens: any;
|
|
128
|
+
thens: any;
|
|
129
|
+
checks: any;
|
|
130
|
+
};
|
|
131
|
+
export {};
|
package/dist/types/Web.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
butThen?: ((store: IStore, callback: any, testResource: ITTestResourceConfiguration) => Promise<ISelection>) | undefined;
|
|
6
|
-
assertioner?: ((t: IThenShape) => any) | undefined;
|
|
7
|
-
afterAll?: ((store: IStore, artificer: ITestArtificer) => any) | undefined;
|
|
8
|
-
afterEach?: ((store: IStore, key: string, artificer: ITestArtificer) => Promise<unknown>) | undefined;
|
|
9
|
-
beforeAll?: ((input: IInput, artificer: ITestArtificer) => Promise<ISubject>) | undefined;
|
|
10
|
-
beforeEach?: ((subject: ISubject, initialValues: any, testResource: ITTestResourceConfiguration, artificer: ITestArtificer) => Promise<IStore>) | undefined;
|
|
11
|
-
}, testResourceRequirement?: ITTestResourceRequest) => Promise<void>;
|
|
1
|
+
import type { IBaseTest, ITestImplementation, ITestInterface, ITestSpecification } from "./Types";
|
|
2
|
+
import Testeranto from "./lib/core.js";
|
|
3
|
+
import { ITTestResourceRequest } from "./lib/index.js";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: Partial<ITestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
12
5
|
export default _default;
|
|
File without changes
|