testeranto 0.62.0 → 0.70.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 +42 -21
- package/dist/cjs-shim.js +2 -2
- package/dist/common/Node.js +7 -24
- package/dist/common/NodeWriter.js +7 -9
- package/dist/common/Project.js +103 -266
- package/dist/common/SubPackages/puppeteer.js +1 -1
- package/dist/common/SubPackages/react-dom/component/web.js +1 -1
- package/dist/common/SubPackages/react-dom/jsx/web.js +15 -7
- package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +1 -1
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/common/SubPackages/react-test-renderer/fc/web.js +1 -1
- package/dist/common/SubPackages/react-test-renderer/jsx/index.js +1 -2
- package/dist/common/SubPackages/react-test-renderer/jsx/web.js +1 -1
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +1 -1
- package/dist/common/Types.js +2 -32
- package/dist/common/Web.js +25 -18
- package/dist/common/electron.js +177 -107
- package/dist/common/esbuildConfigs/index.js +5 -5
- package/dist/common/esbuildConfigs/node.js +17 -15
- package/dist/common/esbuildConfigs/report.js +12 -47
- package/dist/common/esbuildConfigs/tests.js +0 -1
- package/dist/common/esbuildConfigs/web.js +14 -11
- package/dist/common/lib/abstractBase.js +13 -6
- package/dist/common/lib/basebuilder.js +11 -11
- package/dist/common/lib/classBuilder.js +2 -3
- package/dist/common/lib/core.js +37 -8
- package/dist/common/lib/index.js +10 -8
- package/dist/common/lib/types.js +2 -0
- package/dist/common/preload.js +15 -25
- package/dist/common/puppeteerConfiger.js +24 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/Node.js +7 -24
- package/dist/module/NodeWriter.js +7 -9
- package/dist/module/Project.js +104 -267
- package/dist/module/SubPackages/puppeteer.js +1 -1
- package/dist/module/SubPackages/react/jsx/web.js +1 -1
- package/dist/module/SubPackages/react-dom/component/node.js +2 -2
- package/dist/module/SubPackages/react-dom/component/web.js +1 -1
- package/dist/module/SubPackages/react-dom/jsx/web.js +17 -9
- package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +1 -1
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/SubPackages/react-test-renderer/fc/web.js +1 -1
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +1 -2
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +1 -1
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +1 -1
- package/dist/module/Types.js +3 -30
- package/dist/module/Web.js +26 -19
- package/dist/module/electron.js +179 -109
- package/dist/module/esbuildConfigs/index.js +5 -5
- package/dist/module/esbuildConfigs/node.js +17 -15
- package/dist/module/esbuildConfigs/report.js +11 -48
- package/dist/module/esbuildConfigs/tests.js +0 -1
- package/dist/module/esbuildConfigs/web.js +14 -11
- package/dist/module/lib/abstractBase.js +13 -6
- package/dist/module/lib/basebuilder.js +11 -11
- package/dist/module/lib/classBuilder.js +2 -3
- package/dist/module/lib/core.js +39 -10
- package/dist/module/lib/index.js +10 -8
- package/dist/module/lib/types.js +1 -0
- package/dist/module/preload.js +12 -25
- package/dist/module/puppeteerConfiger.js +19 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/Node.d.ts +3 -2
- package/dist/types/Project.d.ts +1 -2
- package/dist/types/SubPackages/puppeteer.d.ts +3 -3
- package/dist/types/SubPackages/react/component/node.d.ts +1 -1
- package/dist/types/SubPackages/react/component/web.d.ts +1 -1
- package/dist/types/SubPackages/react/jsx/index.d.ts +1 -1
- package/dist/types/SubPackages/react/jsx/node.d.ts +1 -1
- package/dist/types/SubPackages/react/jsx/web.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/node.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/web.d.ts +1 -1
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +1 -1
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +3 -3
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +1 -1
- package/dist/types/Types.d.ts +19 -100
- package/dist/types/Web.d.ts +3 -2
- package/dist/types/esbuildConfigs/features.d.ts +1 -1
- package/dist/types/esbuildConfigs/index.d.ts +1 -1
- package/dist/types/esbuildConfigs/node.d.ts +1 -1
- package/dist/types/esbuildConfigs/report.d.ts +4 -0
- package/dist/types/esbuildConfigs/tests.d.ts +1 -1
- package/dist/types/esbuildConfigs/web.d.ts +1 -1
- package/dist/types/lib/abstractBase.d.ts +25 -24
- package/dist/types/lib/basebuilder.d.ts +8 -7
- package/dist/types/lib/classBuilder.d.ts +3 -2
- package/dist/types/lib/core.d.ts +3 -2
- package/dist/types/lib/index.d.ts +4 -3
- package/dist/types/lib/types.d.ts +70 -0
- package/dist/types/puppeteerConfiger.d.ts +4 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/Node.ts +24 -54
- package/src/NodeWriter.ts +21 -18
- package/src/Project.ts +165 -620
- package/src/Report.tsx +1 -1
- package/src/SubPackages/puppeteer.ts +19 -14
- package/src/SubPackages/react/component/node.ts +20 -32
- package/src/SubPackages/react/component/web.ts +20 -30
- package/src/SubPackages/react/jsx/index.ts +13 -24
- package/src/SubPackages/react/jsx/web.ts +10 -8
- package/src/SubPackages/react-dom/component/node.ts +17 -23
- package/src/SubPackages/react-dom/component/web.ts +30 -50
- package/src/SubPackages/react-dom/jsx/web.ts +41 -48
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +27 -37
- package/src/SubPackages/react-test-renderer/component/index.ts +16 -30
- package/src/SubPackages/react-test-renderer/component/node.ts +5 -11
- package/src/SubPackages/react-test-renderer/component/web.ts +5 -11
- package/src/SubPackages/react-test-renderer/fc/node.ts +36 -50
- package/src/SubPackages/react-test-renderer/fc/web.ts +37 -50
- package/src/SubPackages/react-test-renderer/jsx/index.ts +16 -21
- package/src/SubPackages/react-test-renderer/jsx/node.ts +6 -10
- package/src/SubPackages/react-test-renderer/jsx/web.ts +7 -7
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +13 -16
- package/src/Types.ts +73 -307
- package/src/Web.ts +54 -53
- package/src/cjs-shim.js +2 -2
- package/src/electron.ts +258 -191
- package/src/esbuildConfigs/features.ts +3 -4
- package/src/esbuildConfigs/index.ts +8 -8
- package/src/esbuildConfigs/node.ts +21 -20
- package/src/esbuildConfigs/report.ts +15 -51
- package/src/esbuildConfigs/tests.ts +3 -9
- package/src/esbuildConfigs/web.ts +18 -18
- package/src/lib/abstractBase.ts +78 -125
- package/src/lib/basebuilder.ts +109 -134
- package/src/lib/classBuilder.ts +26 -45
- package/src/lib/core.ts +101 -69
- package/src/lib/index.ts +53 -52
- package/src/lib/types.ts +206 -0
- package/src/preload.ts +12 -28
- package/src/puppeteerConfiger.ts +26 -0
- package/src/web.html.ts +1 -1
- package/dist/common/lib/browser.js +0 -26
- package/dist/common/nodeWriterElectron.js +0 -55
- package/dist/module/lib/browser.js +0 -22
- package/dist/module/nodeWriterElectron.js +0 -52
- package/dist/types/lib/browser.d.ts +0 -6
- package/dist/types/nodeWriterElectron.d.ts +0 -2
- package/src/lib/browser.ts +0 -34
- package/src/nodeWriterElectron.ts +0 -71
package/dist/types/Node.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Testeranto from "./lib/core.js";
|
|
2
2
|
import { ITTestResourceRequest } from "./lib/index.js";
|
|
3
|
-
import type { IBaseTest,
|
|
4
|
-
|
|
3
|
+
import type { IBaseTest, ITestImplementation, ITestSpecification } from "./Types.js";
|
|
4
|
+
import { INodeTestInterface } from "./lib/types.js";
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: Partial<INodeTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
5
6
|
export default _default;
|
package/dist/types/Project.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IBaseConfig, IRunTime } from "./
|
|
1
|
+
import { IBaseConfig, IRunTime } from "./lib/types.js";
|
|
2
2
|
export declare class ITProject {
|
|
3
3
|
config: IBaseConfig;
|
|
4
4
|
mode: `up` | `down`;
|
|
5
5
|
constructor(config: IBaseConfig);
|
|
6
6
|
getSecondaryEndpointsPoints(runtime?: IRunTime): string[];
|
|
7
|
-
initiateShutdown(reason: string): void;
|
|
8
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IBaseTest,
|
|
1
|
+
import { IBaseTest, IPartialNodeInterface, ITestImplementation, ITestSpecification } from "../Types";
|
|
2
2
|
declare type IInput = string;
|
|
3
|
-
export declare type IImpl<ISpec extends IBaseTest> = ITestImplementation<ISpec
|
|
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 IBaseTest
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testInput: IInput, testSpecifications: ISpec<ITestShape>, testImplementations: ITestImplementation<ITestShape, object>, testInterface?: Partial<import("../lib/types.js").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 IBaseTest, IState>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
6
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IState>(testImplementations: ITestImplementation<ITestShape, object>, 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 IBaseTest
|
|
6
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
7
|
export default _default;
|
|
@@ -7,7 +7,7 @@ export declare type IInput = () => JSX.Element;
|
|
|
7
7
|
export declare type ISelection = CElement<any, any>;
|
|
8
8
|
export declare type IStore = CElement<any, any>;
|
|
9
9
|
export declare type ISubject = CElement<any, any>;
|
|
10
|
-
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape
|
|
10
|
+
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape>;
|
|
11
11
|
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
12
|
export declare const testInterface: {
|
|
13
13
|
beforeEach: (x: any, ndx: any, testRsource: any, artificer: any) => Promise<IStore>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IBaseTest, IPartialInterface } from "../../../Types";
|
|
2
2
|
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../lib/types.js").ITestInterface<ITestShape>>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBaseTest,
|
|
1
|
+
import { IBaseTest, IPartialWebInterface } from "../../../Types";
|
|
2
2
|
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../lib/types").IWebTestInterface<ITestShape>>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
|
-
import Stream from
|
|
3
|
+
import Stream from "stream";
|
|
4
4
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
5
5
|
declare type IInput = typeof React.Component;
|
|
6
6
|
export declare type IThenShape = any;
|
|
@@ -8,5 +8,5 @@ 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 IBaseTest
|
|
11
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
12
12
|
export default _default;
|
|
@@ -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, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any) => void;
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any) => void;
|
|
5
5
|
export default _default;
|
|
@@ -2,5 +2,5 @@ import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server
|
|
|
2
2
|
import Stream from 'stream';
|
|
3
3
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
4
|
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
5
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: ITestShape["iinput"]) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
2
2
|
import type { IInput } from "./index";
|
|
3
3
|
export declare type ISubject = HTMLElement;
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => void;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
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>>;
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, PropShape>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
|
@@ -9,7 +9,7 @@ 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 IBaseTest
|
|
12
|
+
export declare type IImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape>;
|
|
13
13
|
export declare type ISpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
14
14
|
export declare const testInterface: {
|
|
15
15
|
beforeEach: (CComponent: any, propsAndChildren: any) => Promise<renderer.ReactTestRenderer>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IBaseTest } from "../../../Types";
|
|
3
3
|
import { IImpl, ISpec, IInput } from "./index.js";
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest, IProps, IState>(testImplementations: IImpl<ITestShape
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IProps, IState>(testImplementations: IImpl<ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: {
|
|
5
5
|
new (props: IProps | Readonly<IProps>): import("react").Component<IProps, IState, any>;
|
|
6
6
|
new (props: IProps, context: any): import("react").Component<IProps, IState, any>;
|
|
7
7
|
contextType?: import("react").Context<any> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IBaseTest } from "../../../Types";
|
|
2
2
|
import { IImpl, ISpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends IBaseTest, IProps, IState>(testImplementations: IImpl<ITestShape
|
|
3
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IProps, IState>(testImplementations: IImpl<ITestShape>, testSpecifications: ISpec<ITestShape>, testInput: IInput<any, any>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
4
|
export default _default;
|
|
@@ -4,5 +4,5 @@ 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 IBaseTest
|
|
7
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
8
8
|
export default _default;
|
|
@@ -4,5 +4,5 @@ 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 IBaseTest, IPropShape>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core
|
|
7
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>, IPropShape>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
8
8
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBaseTest } from "../../../Types";
|
|
2
2
|
import type { ITestImpl, ITestSpec } from "../jsx-promised";
|
|
3
3
|
import { IInput } from "./index.js";
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
5
5
|
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
6
|
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
7
7
|
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IInput } from "./index.js";
|
|
2
1
|
import { IBaseTest } from "../../../Types";
|
|
3
2
|
import { ITestImpl, ITestSpec } from "../jsx-promised";
|
|
4
|
-
|
|
3
|
+
import { IInput } from "./index.js";
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface2?: {
|
|
5
5
|
butThen: (s: import("react-test-renderer").ReactTestRenderer, thenCB: any, tr: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
6
6
|
beforeEach: (CComponent: any, props: any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
7
7
|
andWhen: (renderer: import("react-test-renderer").ReactTestRenderer, whenCB: (any: any) => any) => Promise<import("react-test-renderer").ReactTestRenderer>;
|
|
8
|
-
}) => Promise<import("../../../lib/core
|
|
8
|
+
}) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
9
9
|
export default _default;
|
|
@@ -7,7 +7,7 @@ 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 IBaseTest> = ITestImplementation<ITestShape
|
|
10
|
+
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape>;
|
|
11
11
|
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
12
|
export declare const testInterface: {
|
|
13
13
|
beforeEach: (CComponent: any) => Promise<renderer.ReactTestRenderer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInput } from ".";
|
|
2
2
|
import { IBaseTest } from "../../../Types";
|
|
3
3
|
import { ITestImpl, ITestSpec } from "../../react/jsx";
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBaseTest } from "../../../Types";
|
|
2
2
|
import { ITestImpl, ITestSpec } from "../../react/jsx";
|
|
3
3
|
import { IInput } from "./index";
|
|
4
|
-
declare const _default: <ITestShape extends IBaseTest
|
|
4
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
5
5
|
export default _default;
|
package/dist/types/Types.d.ts
CHANGED
|
@@ -1,64 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Page, Browser } from "puppeteer-core";
|
|
3
|
-
import { ITTestResourceConfiguration, ITTestResourceRequest, ITestArtificer, ITestCheckCallback } from "./lib/index.js";
|
|
1
|
+
import { ITTestResourceRequest, ITestCheckCallback } from "./lib/index.js";
|
|
4
2
|
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen, BaseGiven } from "./lib/abstractBase.js";
|
|
5
3
|
import Testeranto from "./lib/core.js";
|
|
6
|
-
|
|
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
|
-
};
|
|
39
|
-
export declare type IBaseConfig = {
|
|
40
|
-
outdir: string;
|
|
41
|
-
tests: ITestTypes[];
|
|
42
|
-
features: string;
|
|
43
|
-
externals: string[];
|
|
44
|
-
clearScreen: boolean;
|
|
45
|
-
devMode: boolean;
|
|
46
|
-
webPlugins: any[];
|
|
47
|
-
nodePlugins: any[];
|
|
48
|
-
minify: boolean;
|
|
49
|
-
outbase: string;
|
|
50
|
-
ports: string[];
|
|
51
|
-
debugger: boolean;
|
|
52
|
-
};
|
|
4
|
+
import { INodeTestInterface, ITestInterface, IWebTestInterface } from "./lib/types.js";
|
|
53
5
|
export declare type IPartialInterface<I extends IBaseTest> = Partial<ITestInterface<I>>;
|
|
54
6
|
export declare type IPartialNodeInterface<I extends IBaseTest> = Partial<INodeTestInterface<I>>;
|
|
55
|
-
export declare type
|
|
56
|
-
export declare type
|
|
57
|
-
export declare type ITestTypes = [
|
|
58
|
-
string,
|
|
59
|
-
IRunTime,
|
|
60
|
-
ITestTypes[]
|
|
61
|
-
];
|
|
7
|
+
export declare type IPartialWebInterface<I extends IBaseTest> = Partial<IWebTestInterface<I>>;
|
|
8
|
+
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>>;
|
|
62
9
|
export declare type ITestSpecification<ITestShape extends IBaseTest> = (Suite: {
|
|
63
10
|
[K in keyof ITestShape["suites"]]: (name: string, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
64
11
|
}, Given: {
|
|
@@ -68,64 +15,36 @@ export declare type ITestSpecification<ITestShape extends IBaseTest> = (Suite: {
|
|
|
68
15
|
}, Then: {
|
|
69
16
|
[K in keyof ITestShape["thens"]]: (...xtrasD: ITestShape["thens"][K]) => BaseThen<ITestShape>;
|
|
70
17
|
}, Check: ITestCheckCallback<ITestShape>) => any[];
|
|
71
|
-
export declare type ITestImplementation<ITestShape extends IBaseTest, IMod> = Modify<{
|
|
18
|
+
export declare type ITestImplementation<ITestShape extends IBaseTest, IMod = object> = Modify<{
|
|
72
19
|
suites: {
|
|
73
20
|
[K in keyof ITestShape["suites"]]: string;
|
|
74
21
|
};
|
|
75
22
|
givens: {
|
|
76
|
-
[K in keyof ITestShape["givens"]]: (...Ig: ITestShape["givens"][K]) => ITestShape[
|
|
23
|
+
[K in keyof ITestShape["givens"]]: (...Ig: ITestShape["givens"][K]) => ITestShape["given"];
|
|
77
24
|
};
|
|
78
25
|
whens: {
|
|
79
|
-
[K in keyof ITestShape["whens"]]: (...Iw: ITestShape["whens"][K]) => (zel: ITestShape[
|
|
26
|
+
[K in keyof ITestShape["whens"]]: (...Iw: ITestShape["whens"][K]) => (zel: ITestShape["iselection"]) => ITestShape["when"];
|
|
80
27
|
};
|
|
81
28
|
thens: {
|
|
82
|
-
[K in keyof ITestShape["thens"]]: (...It: ITestShape["thens"][K]) => (ssel: ITestShape[
|
|
29
|
+
[K in keyof ITestShape["thens"]]: (...It: ITestShape["thens"][K]) => (ssel: ITestShape["iselection"]) => ITestShape["then"];
|
|
83
30
|
};
|
|
84
31
|
checks: {
|
|
85
|
-
[K in keyof ITestShape["checks"]]: (...Ic: ITestShape["checks"][K]) => ITestShape[
|
|
32
|
+
[K in keyof ITestShape["checks"]]: (...Ic: ITestShape["checks"][K]) => ITestShape["given"];
|
|
86
33
|
};
|
|
87
34
|
}, 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
35
|
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
107
|
-
export declare type IBaseTest = {
|
|
108
|
-
iinput:
|
|
109
|
-
isubject:
|
|
110
|
-
istore:
|
|
111
|
-
iselection:
|
|
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> = {
|
|
36
|
+
export declare type IBaseTest<Shape = any, II = Shape> = {
|
|
37
|
+
iinput: II;
|
|
38
|
+
isubject: Shape;
|
|
39
|
+
istore: Shape;
|
|
40
|
+
iselection: Shape;
|
|
122
41
|
given: any;
|
|
123
42
|
when: any;
|
|
124
43
|
then: any;
|
|
125
|
-
suites: any
|
|
126
|
-
givens: any
|
|
127
|
-
whens: any
|
|
128
|
-
thens: any
|
|
129
|
-
checks: any
|
|
44
|
+
suites: Record<string, any>;
|
|
45
|
+
givens: Record<string, any>;
|
|
46
|
+
whens: Record<string, any>;
|
|
47
|
+
thens: Record<string, any>;
|
|
48
|
+
checks: Record<string, any>;
|
|
130
49
|
};
|
|
131
50
|
export {};
|
package/dist/types/Web.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { IBaseTest, ITestImplementation,
|
|
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
|
-
|
|
4
|
+
import { IWebTestInterface } from "./lib/types";
|
|
5
|
+
declare const _default: <ITestShape extends IBaseTest<any, any>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: Partial<IWebTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
5
6
|
export default _default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { IBaseTest } from "../Types";
|
|
1
2
|
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
2
|
-
import {
|
|
3
|
+
import { IUtils } from "./types";
|
|
3
4
|
export declare type IGivens<ITestShape extends IBaseTest> = Record<string, BaseGiven<ITestShape>>;
|
|
4
5
|
export declare abstract class BaseSuite<ITestShape extends IBaseTest> {
|
|
5
6
|
name: string;
|
|
6
7
|
givens: IGivens<ITestShape>;
|
|
7
8
|
checks: BaseCheck<ITestShape>[];
|
|
8
|
-
store: ITestShape[
|
|
9
|
+
store: ITestShape["istore"];
|
|
9
10
|
fails: BaseGiven<ITestShape>[];
|
|
10
11
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
11
12
|
index: number;
|
|
@@ -27,9 +28,9 @@ export declare abstract class BaseSuite<ITestShape extends IBaseTest> {
|
|
|
27
28
|
}[];
|
|
28
29
|
fails: BaseGiven<ITestShape>[];
|
|
29
30
|
};
|
|
30
|
-
setup(s: ITestShape[
|
|
31
|
-
assertThat(t: ITestShape[
|
|
32
|
-
run(input: ITestShape[
|
|
31
|
+
setup(s: ITestShape["iinput"], artifactory: ITestArtifactory, tr: ITTestResourceConfiguration, utils: IUtils): Promise<ITestShape["isubject"]>;
|
|
32
|
+
assertThat(t: ITestShape["then"]): unknown;
|
|
33
|
+
run(input: ITestShape["iinput"], testResourceConfiguration: ITTestResourceConfiguration, artifactory: (fPath: string, value: unknown) => void, tLog: (...string: any[]) => void, utils: IUtils): Promise<BaseSuite<ITestShape>>;
|
|
33
34
|
}
|
|
34
35
|
export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
35
36
|
name: string;
|
|
@@ -37,13 +38,13 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
|
37
38
|
whens: BaseWhen<ITestShape>[];
|
|
38
39
|
thens: BaseThen<ITestShape>[];
|
|
39
40
|
error: Error;
|
|
40
|
-
store: ITestShape[
|
|
41
|
+
store: ITestShape["istore"];
|
|
41
42
|
recommendedFsPath: string;
|
|
42
|
-
givenCB: ITestShape[
|
|
43
|
+
givenCB: ITestShape["given"];
|
|
43
44
|
initialValues: any;
|
|
44
|
-
constructor(name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], givenCB: ITestShape[
|
|
45
|
-
beforeAll(store: ITestShape[
|
|
46
|
-
afterAll(store: ITestShape[
|
|
45
|
+
constructor(name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], givenCB: ITestShape["given"], initialValues: any);
|
|
46
|
+
beforeAll(store: ITestShape["istore"], artifactory: ITestArtifactory): ITestShape["istore"];
|
|
47
|
+
afterAll(store: ITestShape["istore"], artifactory: ITestArtifactory, utils: IUtils): ITestShape["istore"];
|
|
47
48
|
toObj(): {
|
|
48
49
|
name: string;
|
|
49
50
|
whens: {
|
|
@@ -57,33 +58,33 @@ export declare abstract class BaseGiven<ITestShape extends IBaseTest> {
|
|
|
57
58
|
error: (string | Error | undefined)[] | null;
|
|
58
59
|
features: string[];
|
|
59
60
|
};
|
|
60
|
-
abstract givenThat(subject: ITestShape[
|
|
61
|
-
afterEach(store: ITestShape[
|
|
62
|
-
give(subject: ITestShape[
|
|
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, utils: IUtils): Promise<unknown>;
|
|
63
|
+
give(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, utils: IUtils): Promise<ITestShape["istore"]>;
|
|
63
64
|
}
|
|
64
65
|
export declare abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
65
66
|
name: string;
|
|
66
|
-
whenCB: (x: ITestShape[
|
|
67
|
+
whenCB: (x: ITestShape["iselection"]) => ITestShape["then"];
|
|
67
68
|
error: boolean;
|
|
68
|
-
constructor(name: string, whenCB: (xyz: ITestShape[
|
|
69
|
-
abstract andWhen(store: ITestShape[
|
|
69
|
+
constructor(name: string, whenCB: (xyz: ITestShape["iselection"]) => ITestShape["then"]);
|
|
70
|
+
abstract andWhen(store: ITestShape["istore"], whenCB: (x: ITestShape["iselection"]) => ITestShape["then"], testResource: any): any;
|
|
70
71
|
toObj(): {
|
|
71
72
|
name: string;
|
|
72
73
|
error: boolean;
|
|
73
74
|
};
|
|
74
|
-
test(store: ITestShape[
|
|
75
|
+
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog, utils: IUtils): Promise<any>;
|
|
75
76
|
}
|
|
76
77
|
export declare abstract class BaseThen<ITestShape extends IBaseTest> {
|
|
77
78
|
name: string;
|
|
78
|
-
thenCB: (storeState: ITestShape[
|
|
79
|
+
thenCB: (storeState: ITestShape["iselection"]) => ITestShape["then"];
|
|
79
80
|
error: boolean;
|
|
80
|
-
constructor(name: string, thenCB: (val: ITestShape[
|
|
81
|
+
constructor(name: string, thenCB: (val: ITestShape["iselection"]) => ITestShape["then"]);
|
|
81
82
|
toObj(): {
|
|
82
83
|
name: string;
|
|
83
84
|
error: boolean;
|
|
84
85
|
};
|
|
85
|
-
abstract butThen(store: ITestShape[
|
|
86
|
-
test(store: ITestShape[
|
|
86
|
+
abstract butThen(store: ITestShape["istore"], thenCB: any, testResourceConfiguration?: any): Promise<ITestShape["iselection"]>;
|
|
87
|
+
test(store: ITestShape["istore"], testResourceConfiguration: any, tLog: ITLog, utils: IUtils): Promise<ITestShape["then"] | undefined>;
|
|
87
88
|
}
|
|
88
89
|
export declare abstract class BaseCheck<ITestShape extends IBaseTest> {
|
|
89
90
|
name: string;
|
|
@@ -96,7 +97,7 @@ export declare abstract class BaseCheck<ITestShape extends IBaseTest> {
|
|
|
96
97
|
[K in keyof ITestShape["thens"]]: (p: any, tc: any) => BaseThen<ITestShape>;
|
|
97
98
|
};
|
|
98
99
|
constructor(name: string, features: string[], checkCB: (whens: any, thens: any) => any, whens: any, thens: any);
|
|
99
|
-
abstract checkThat(subject: ITestShape[
|
|
100
|
-
afterEach(store: ITestShape[
|
|
101
|
-
check(subject: ITestShape[
|
|
100
|
+
abstract checkThat(subject: ITestShape["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory): Promise<ITestShape["istore"]>;
|
|
101
|
+
afterEach(store: ITestShape["istore"], key: string, cb: any, utils: IUtils): Promise<unknown>;
|
|
102
|
+
check(subject: ITestShape["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, utils: IUtils): Promise<void>;
|
|
102
103
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { IBaseTest, ICheckKlasser, IGivenKlasser, ISuiteKlasser, ITestSpecification, IThenKlasser, IWhenKlasser } from "../Types";
|
|
2
|
-
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
3
1
|
import { ITTestResourceRequest, ITestJob, ILogWriter } from ".";
|
|
2
|
+
import { IBaseTest, ITestSpecification } from "../Types.js";
|
|
3
|
+
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
|
+
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
4
5
|
export declare abstract class BaseBuilder<ITestShape extends IBaseTest, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
5
|
-
readonly input: ITestShape[
|
|
6
|
+
readonly input: ITestShape["iinput"];
|
|
6
7
|
specs: any;
|
|
7
|
-
assertThis: (t:
|
|
8
|
+
assertThis: (t: ITestShape["then"]) => {};
|
|
8
9
|
testResourceRequirement: ITTestResourceRequest;
|
|
9
10
|
artifacts: Promise<unknown>[];
|
|
10
11
|
testJobs: ITestJob[];
|
|
@@ -14,11 +15,11 @@ export declare abstract class BaseBuilder<ITestShape extends IBaseTest, SuiteExt
|
|
|
14
15
|
whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>;
|
|
15
16
|
thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>;
|
|
16
17
|
checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>;
|
|
17
|
-
constructor(input: ITestShape[
|
|
18
|
+
constructor(input: ITestShape["iinput"], suitesOverrides: Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>, givenOverides: Record<keyof GivenExtensions, IGivenKlasser<ITestShape>>, whenOverides: Record<keyof WhenExtensions, IWhenKlasser<ITestShape>>, thenOverides: Record<keyof ThenExtensions, IThenKlasser<ITestShape>>, checkOverides: Record<keyof CheckExtensions, ICheckKlasser<ITestShape>>, logWriter: ILogWriter, testResourceRequirement: ITTestResourceRequest, testSpecification: any);
|
|
18
19
|
Specs(): any;
|
|
19
20
|
Suites(): Record<keyof SuiteExtensions, ISuiteKlasser<ITestShape>>;
|
|
20
21
|
Given(): Record<keyof GivenExtensions, (name: string, features: string[], whens: BaseWhen<ITestShape>[], thens: BaseThen<ITestShape>[], gcb: any) => BaseGiven<ITestShape>>;
|
|
21
|
-
When(): Record<keyof WhenExtensions, (arg0: ITestShape[
|
|
22
|
-
Then(): Record<keyof ThenExtensions, (selection: ITestShape[
|
|
22
|
+
When(): Record<keyof WhenExtensions, (arg0: ITestShape["istore"], ...arg1: any) => BaseWhen<ITestShape>>;
|
|
23
|
+
Then(): Record<keyof ThenExtensions, (selection: ITestShape["iselection"], expectation: any) => BaseThen<ITestShape>>;
|
|
23
24
|
Check(): Record<keyof CheckExtensions, (feature: string, callback: (whens: any, thens: any) => any, whens: any, thens: any, x: any) => BaseCheck<ITestShape>>;
|
|
24
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IBaseTest, ITestImplementation, ITestSpecification } from "../Types.js";
|
|
2
2
|
import { BaseBuilder } from "./basebuilder.js";
|
|
3
3
|
import { ILogWriter, ITTestResourceRequest } from ".";
|
|
4
|
+
import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser } from "./types.js";
|
|
4
5
|
export declare abstract class ClassBuilder<ITestShape extends IBaseTest> extends BaseBuilder<ITestShape, any, any, any, any, any> {
|
|
5
|
-
constructor(testImplementation: ITestImplementation<ITestShape, any>, testSpecification: ITestSpecification<ITestShape>, input: ITestShape[
|
|
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, logWriter: ILogWriter);
|
|
6
7
|
}
|
package/dist/types/lib/core.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IBaseTest, ITestSpecification, ITestImplementation } from "../Types.js";
|
|
2
|
+
import { ITestInterface, IUtils } from "./types.js";
|
|
2
3
|
import { ILogWriter, ITTestResourceConfiguration, ITTestResourceRequest, ITestJob } from "./index.js";
|
|
3
4
|
import { ClassBuilder } from "./classBuilder.js";
|
|
4
5
|
export default abstract class Testeranto<ITestShape extends IBaseTest> extends ClassBuilder<ITestShape> {
|
|
5
|
-
constructor(input: ITestShape[
|
|
6
|
+
constructor(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape>, testResourceRequirement: ITTestResourceRequest | undefined, logWriter: ILogWriter, testInterface: Partial<ITestInterface<ITestShape>>);
|
|
6
7
|
abstract receiveTestResourceConfig(t: ITestJob, partialTestResource: ITTestResourceConfiguration, utils: IUtils): any;
|
|
7
8
|
}
|