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
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IBaseTest
|
|
1
|
+
import { IBaseTest } from "../Types.js";
|
|
2
2
|
import { IGivens, BaseCheck, BaseSuite, BaseWhen, BaseThen } from "./abstractBase.js";
|
|
3
|
+
import { INodeUtils, ITestInterface, IWebUtils } from "./types.js";
|
|
3
4
|
export declare const BaseTestInterface: ITestInterface<IBaseTest>;
|
|
4
5
|
export declare const DefaultTestInterface: (p: Partial<ITestInterface<any>>) => ITestInterface<any>;
|
|
5
6
|
export declare type ITTestResourceConfiguration = {
|
|
@@ -31,12 +32,12 @@ declare type ITest = {
|
|
|
31
32
|
checks: BaseCheck<IBaseTest>[];
|
|
32
33
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
33
34
|
};
|
|
34
|
-
export declare type ITestJob = {
|
|
35
|
+
export declare type ITestJob<T = INodeUtils | IWebUtils> = {
|
|
35
36
|
toObj(): object;
|
|
36
37
|
test: ITest;
|
|
37
38
|
runner: (x: ITTestResourceConfiguration, t: ITLog) => Promise<BaseSuite<IBaseTest>>;
|
|
38
39
|
testResourceRequirement: ITTestResourceRequirement;
|
|
39
|
-
receiveTestResourceConfig: (testResource: any, utils:
|
|
40
|
+
receiveTestResourceConfig: (testResource: any, utils: T) => Promise<{
|
|
40
41
|
failed: number;
|
|
41
42
|
artifacts: Promise<unknown>[];
|
|
42
43
|
logPromise: Promise<unknown>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/// <reference types="electron" />
|
|
2
|
+
import { IBaseTest } from "../Types";
|
|
3
|
+
import puppeteer from "puppeteer-core";
|
|
4
|
+
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
5
|
+
import { ITTestResourceConfiguration, ITestArtificer } from ".";
|
|
6
|
+
export declare type IRunTime = `node` | `web`;
|
|
7
|
+
export declare type ITestTypes = [string, IRunTime, ITestTypes[]];
|
|
8
|
+
export declare type IJsonConfig = {
|
|
9
|
+
outdir: string;
|
|
10
|
+
tests: ITestTypes[];
|
|
11
|
+
features: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type IBaseConfig = {
|
|
14
|
+
clearScreen: boolean;
|
|
15
|
+
debugger: boolean;
|
|
16
|
+
devMode: boolean;
|
|
17
|
+
externals: string[];
|
|
18
|
+
features: string;
|
|
19
|
+
minify: boolean;
|
|
20
|
+
nodePlugins: any[];
|
|
21
|
+
outbase: string;
|
|
22
|
+
outdir: string;
|
|
23
|
+
ports: string[];
|
|
24
|
+
tests: ITestTypes[];
|
|
25
|
+
webPlugins: any[];
|
|
26
|
+
};
|
|
27
|
+
export declare type IBuiltConfig = {
|
|
28
|
+
buildDir: string;
|
|
29
|
+
} & IBaseConfig;
|
|
30
|
+
export declare type INodeUtils = {
|
|
31
|
+
browser: puppeteer.Browser;
|
|
32
|
+
ipc: Electron.ParentPort;
|
|
33
|
+
};
|
|
34
|
+
export declare type IWebUtils = {
|
|
35
|
+
browser: puppeteer.Browser;
|
|
36
|
+
ipc: Electron.IpcRenderer;
|
|
37
|
+
};
|
|
38
|
+
export declare type IUtils = INodeUtils | IWebUtils;
|
|
39
|
+
export declare type IWebTestInterface<ITestShape extends IBaseTest> = {
|
|
40
|
+
assertThis: (x: ITestShape["then"]) => void;
|
|
41
|
+
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
42
|
+
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
43
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, browser: IWebUtils) => any;
|
|
44
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils: IWebUtils) => Promise<unknown>;
|
|
45
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils: IWebUtils) => Promise<ITestShape["isubject"]>;
|
|
46
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
47
|
+
};
|
|
48
|
+
export declare type INodeTestInterface<ITestShape extends IBaseTest> = {
|
|
49
|
+
assertThis: (x: ITestShape["then"]) => void;
|
|
50
|
+
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
51
|
+
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
52
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, utils: INodeUtils) => any;
|
|
53
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils: INodeUtils) => Promise<unknown>;
|
|
54
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils: INodeUtils) => Promise<ITestShape["isubject"]>;
|
|
55
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
56
|
+
};
|
|
57
|
+
export declare type ITestInterface<ITestShape extends IBaseTest> = {
|
|
58
|
+
assertThis: (x: ITestShape["then"]) => void;
|
|
59
|
+
andWhen: (store: ITestShape["istore"], whenCB: ITestShape["when"], testResource: ITTestResourceConfiguration) => Promise<ITestShape["istore"]>;
|
|
60
|
+
butThen: (store: ITestShape["istore"], thenCB: any, testResource: ITTestResourceConfiguration) => Promise<ITestShape["iselection"]>;
|
|
61
|
+
afterAll: (store: ITestShape["istore"], artificer: ITestArtificer, utils: IUtils) => any;
|
|
62
|
+
afterEach: (store: ITestShape["istore"], key: string, artificer: ITestArtificer, utils: IUtils) => Promise<unknown>;
|
|
63
|
+
beforeAll: (input: ITestShape["iinput"], testResource: ITTestResourceConfiguration, artificer: ITestArtificer, utils: IUtils) => Promise<ITestShape["isubject"]>;
|
|
64
|
+
beforeEach: (subject: ITestShape["isubject"], initializer: (c?: any) => ITestShape["given"], artificer: ITestArtificer, testResource: ITTestResourceConfiguration, initialValues: any) => Promise<ITestShape["istore"]>;
|
|
65
|
+
};
|
|
66
|
+
export declare type ISuiteKlasser<ITestShape extends IBaseTest> = (name: string, index: number, givens: IGivens<ITestShape>, checks: BaseCheck<ITestShape>[]) => BaseSuite<ITestShape>;
|
|
67
|
+
export declare type IGivenKlasser<ITestShape extends IBaseTest> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<ITestShape>;
|
|
68
|
+
export declare type IWhenKlasser<ITestShape extends IBaseTest> = (s: any, o: any) => BaseWhen<ITestShape>;
|
|
69
|
+
export declare type IThenKlasser<ITestShape extends IBaseTest> = (s: any, o: any) => BaseThen<ITestShape>;
|
|
70
|
+
export declare type ICheckKlasser<ITestShape extends IBaseTest> = (n: any, f: any, cb: any, w: any, t: any) => BaseCheck<ITestShape>;
|