testeranto 0.85.0 → 0.94.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 +1 -3
- package/bin/init-docs.js +24 -0
- package/bundle.js +53 -0
- package/dist/common/dist/module/src/Init.js +40 -0
- package/dist/common/src/Init.js +30 -0
- package/dist/common/src/Node.js +5 -3
- package/dist/common/src/PM/main.js +136 -90
- package/dist/common/src/Project.js +82 -0
- package/dist/common/src/Puppeteer.js +0 -2
- 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 +7 -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/{run-tests.js → src/build-tests.js} +10 -5
- package/dist/common/src/defaultConfig.js +19 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +26 -16
- package/dist/common/src/init-docs.js +43 -0
- package/dist/common/src/lib/abstractBase.js +29 -248
- 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 -26
- package/dist/common/{build-tests.js → src/run-tests.js} +10 -9
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +30 -0
- package/dist/module/src/Node.js +5 -3
- package/dist/module/src/PM/main.js +136 -90
- package/dist/module/src/Project.js +82 -0
- package/dist/module/src/Puppeteer.js +0 -2
- 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 +7 -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/build-tests.js +11 -0
- package/dist/module/src/defaultConfig.js +17 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +26 -16
- package/dist/module/src/init-docs.js +15 -0
- package/dist/module/src/lib/abstractBase.js +29 -248
- 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 -26
- package/dist/module/src/run-tests.js +11 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/build-tests.mjs +553 -0
- package/dist/prebuild/init-docs.mjs +48 -0
- package/dist/prebuild/run-tests.mjs +871 -0
- package/dist/types/dist/module/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +4 -1
- package/dist/types/src/PM/main.d.ts +2 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
- package/dist/types/src/Web.d.ts +2 -2
- package/dist/types/src/build-tests.d.ts +1 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/init-docs.d.ts +1 -0
- 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/types.d.ts +5 -1
- package/dist/types/src/run-tests.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +21 -24
- package/src/Init.ts +28 -0
- package/src/Node.ts +6 -3
- package/src/PM/main.ts +168 -110
- package/src/Project.ts +103 -0
- package/src/Puppeteer.ts +0 -2
- package/src/SubPackages/puppeteer.ts +1 -1
- package/src/SubPackages/react/jsx/index.ts +15 -7
- package/src/SubPackages/react/jsx/node.ts +6 -5
- package/src/SubPackages/react-dom/component/web.ts +28 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
- package/src/Web.ts +45 -23
- package/src/build-tests.ts +12 -0
- package/src/defaultConfig.ts +20 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +46 -17
- package/src/init-docs.ts +19 -0
- package/src/lib/abstractBase.ts +38 -255
- 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 +3 -1
- package/src/run-tests.ts +12 -0
- package/tsconfig.json +1 -1
- package/build-tests.ts +0 -16
- package/dist/common/init-docs.js +0 -8
- package/dist/module/build-tests.js +0 -10
- package/dist/module/init-docs.js +0 -3
- package/dist/module/run-tests.js +0 -6
- package/dist/prebuild/Puppeteer.mjs +0 -82033
- package/dist/types/build-tests.d.ts +0 -3
- package/dist/types/init-docs.d.ts +0 -2
- package/dist/types/run-tests.d.ts +0 -2
- package/init-docs.ts +0 -5
- package/pupBuild.js +0 -18
- package/run-tests.ts +0 -9
package/dist/types/src/Node.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ import type { IBaseTest, ITestImplementation, ITestSpecification } from "./Types
|
|
|
4
4
|
import { ITestInterface, INodeTestInterface } 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
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: ITestImplementation<ITestShape, object>, testInterface: Partial<INodeTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
10
13
|
export default _default;
|
|
@@ -7,6 +7,7 @@ import { PassThrough } from "stream";
|
|
|
7
7
|
import { IBuiltConfig, ITestTypes } from "../lib/types";
|
|
8
8
|
import { PM } from "./index.js";
|
|
9
9
|
import { ITLog } from "../lib/index.js";
|
|
10
|
+
import { Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
10
11
|
export declare class PM_Main extends PM {
|
|
11
12
|
browser: Browser;
|
|
12
13
|
shutdownMode: boolean;
|
|
@@ -42,7 +43,7 @@ export declare class PM_Main extends PM {
|
|
|
42
43
|
register: (src: string) => void;
|
|
43
44
|
deregister: (src: string) => void;
|
|
44
45
|
launchNode: (src: string, dest: string) => Promise<void>;
|
|
45
|
-
launchWebSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<
|
|
46
|
+
launchWebSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<Page>;
|
|
46
47
|
launchNodeSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<void>;
|
|
47
48
|
launchWeb: (t: string, dest: string, sidecars: ITestTypes[]) => void;
|
|
48
49
|
receiveFeatures: (features: string[], destFolder: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPartialInterface } from "../../../Types";
|
|
2
2
|
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface
|
|
3
|
+
declare const _default: <ITestShape extends 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,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<{}>;
|
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 { ITestInterface, IWebTestInterface } from "./lib/types";
|
|
4
|
+
import { IFinalResults, ITestInterface, IWebTestInterface } 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
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: ITestImplementation<ITestShape, object>, testInterface: Partial<IWebTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
10
10
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,6 +3,10 @@ import type { Plugin } from "esbuild";
|
|
|
3
3
|
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
4
4
|
import { ITTestResourceConfiguration, ITestArtificer } from ".";
|
|
5
5
|
import { PM } from "../PM/index";
|
|
6
|
+
export declare type IFinalResults = {
|
|
7
|
+
features: string[];
|
|
8
|
+
failed: number;
|
|
9
|
+
};
|
|
6
10
|
export declare type IRunTime = `node` | `web`;
|
|
7
11
|
export declare type ITestTypes = [string, IRunTime, {
|
|
8
12
|
ports: number;
|
|
@@ -55,7 +59,7 @@ export declare type ITestInterface<ITestShape extends IBaseTest<unknown, unknown
|
|
|
55
59
|
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, pm: PM) => any;
|
|
56
60
|
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, pm: PM) => Promise<unknown>;
|
|
57
61
|
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, pm: PM) => Promise<ITestShape["isubject"]>;
|
|
58
|
-
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], testResource: ITTestResourceConfiguration, initialValues: any, pm: PM) => Promise<ITestShape["istore"]>;
|
|
62
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any, pm: PM) => Promise<ITestShape["istore"]>;
|
|
59
63
|
};
|
|
60
64
|
export declare type ISuiteKlasser<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>>> = (name: string, index: number, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
61
65
|
export declare type IGivenKlasser<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>>> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<ITestShape>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|