testeranto 0.90.0 → 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +4 -7
- package/dist/common/src/Node.js +5 -3
- package/dist/common/src/PM/main.js +254 -126
- package/dist/common/src/PM/node.js +20 -5
- package/dist/common/src/PM/web.js +19 -4
- package/dist/common/src/SubPackages/puppeteer.js +1 -1
- package/dist/common/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/common/src/SubPackages/react/jsx/node.js +2 -2
- package/dist/common/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/common/src/Web.js +25 -21
- package/dist/common/src/cli.js +439 -0
- package/dist/common/src/cli2.js +144 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +18 -8
- package/dist/common/src/esbuildConfigs/node.js +1 -4
- package/dist/common/src/esbuildConfigs/web.js +1 -1
- package/dist/common/src/lib/abstractBase.js +31 -263
- package/dist/common/src/lib/basebuilder.js +1 -11
- package/dist/common/src/lib/classBuilder.js +1 -1
- package/dist/common/src/lib/core.js +8 -28
- package/dist/common/src/lib/types.js +1 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Node.js +5 -3
- package/dist/module/src/PM/main.js +254 -126
- package/dist/module/src/PM/node.js +20 -5
- package/dist/module/src/PM/web.js +19 -4
- package/dist/module/src/SubPackages/puppeteer.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/module/src/SubPackages/react/jsx/node.js +2 -2
- package/dist/module/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/module/src/Web.js +25 -21
- package/dist/module/src/cli.js +411 -0
- package/dist/module/src/cli2.js +116 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +18 -8
- package/dist/module/src/esbuildConfigs/node.js +1 -4
- package/dist/module/src/esbuildConfigs/web.js +1 -1
- package/dist/module/src/lib/abstractBase.js +31 -263
- package/dist/module/src/lib/basebuilder.js +1 -11
- package/dist/module/src/lib/classBuilder.js +1 -1
- package/dist/module/src/lib/core.js +8 -28
- package/dist/module/src/lib/types.js +1 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/cli.mjs +1491 -0
- package/dist/prebuild/{run-tests.mjs → cli2.mjs} +223 -212
- package/dist/types/src/Node.d.ts +6 -3
- package/dist/types/src/PM/index.d.ts +10 -2
- package/dist/types/src/PM/main.d.ts +14 -7
- package/dist/types/src/PM/node.d.ts +9 -2
- package/dist/types/src/PM/web.d.ts +9 -3
- package/dist/types/src/SubPackages/puppeteer.d.ts +1 -1
- package/dist/types/src/SubPackages/react/component/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +3 -3
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +3 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +2 -2
- package/dist/types/src/Types.d.ts +60 -21
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +6 -2
- package/dist/types/src/lib/core.d.ts +3 -3
- package/dist/types/src/lib/index.d.ts +1 -1
- package/dist/types/src/lib/types.d.ts +6 -30
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +23 -20
- package/src/Node.ts +6 -3
- package/src/PM/index.ts +12 -8
- package/src/PM/main.ts +331 -165
- package/src/PM/node.ts +42 -7
- package/src/PM/web.ts +33 -5
- package/src/SubPackages/puppeteer.ts +1 -1
- package/src/SubPackages/react/jsx/index.ts +15 -7
- package/src/SubPackages/react/jsx/node.ts +18 -6
- package/src/SubPackages/react-dom/component/web.ts +28 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
- package/src/SubPackages/react-test-renderer/jsx/node.ts +16 -1
- package/src/Types.ts +362 -114
- package/src/Web.ts +45 -23
- package/src/cli.ts +535 -0
- package/src/cli2.ts +157 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +27 -9
- package/src/esbuildConfigs/node.ts +4 -7
- package/src/esbuildConfigs/web.ts +4 -3
- package/src/lib/abstractBase.ts +84 -291
- package/src/lib/basebuilder.ts +1 -12
- package/src/lib/classBuilder.ts +2 -1
- package/src/lib/core.ts +17 -29
- package/src/lib/types.ts +5 -177
- package/dist/common/src/Aider.js +0 -143
- package/dist/common/src/Project.js +0 -225
- package/dist/common/src/Puppeteer.js +0 -113
- package/dist/common/src/build-tests.js +0 -39
- package/dist/common/src/esbuildConfigs/features.js +0 -14
- package/dist/common/src/esbuildConfigs/report.js +0 -14
- package/dist/common/src/esbuildConfigs/tests.js +0 -13
- package/dist/common/src/run-tests.js +0 -39
- package/dist/module/src/Aider.js +0 -136
- package/dist/module/src/Project.js +0 -218
- package/dist/module/src/Puppeteer.js +0 -108
- package/dist/module/src/build-tests.js +0 -11
- package/dist/module/src/esbuildConfigs/features.js +0 -12
- package/dist/module/src/esbuildConfigs/report.js +0 -14
- package/dist/module/src/esbuildConfigs/tests.js +0 -11
- package/dist/module/src/run-tests.js +0 -11
- package/dist/prebuild/build-tests.mjs +0 -552
- package/dist/types/src/Aider.d.ts +0 -1
- package/dist/types/src/Project.d.ts +0 -12
- package/dist/types/src/Puppeteer.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
- package/src/Aider.ts +0 -168
- package/src/Project.ts +0 -291
- package/src/Puppeteer.ts +0 -145
- package/src/build-tests.ts +0 -12
- package/src/esbuildConfigs/features.ts +0 -17
- package/src/esbuildConfigs/report.ts +0 -15
- package/src/esbuildConfigs/tests.ts +0 -14
- package/src/run-tests.ts +0 -12
- /package/dist/types/src/{build-tests.d.ts → cli.d.ts} +0 -0
- /package/dist/types/src/{run-tests.d.ts → cli2.d.ts} +0 -0
package/src/PM/node.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import puppeteer from "puppeteer-core";
|
|
3
|
+
import puppeteer, { ScreencastOptions, ScreenRecorder } from "puppeteer-core";
|
|
4
4
|
import { PassThrough } from "stream";
|
|
5
5
|
|
|
6
6
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
7
7
|
|
|
8
8
|
import { PM } from "./index.js";
|
|
9
|
-
import { Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
9
|
+
import { CdpPage, Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
10
10
|
|
|
11
11
|
type IFPaths = string[];
|
|
12
12
|
const fPaths: IFPaths = [];
|
|
@@ -23,10 +23,23 @@ export class PM_Node extends PM {
|
|
|
23
23
|
this.testResourceConfiguration = t;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
waitForSelector(p: string, s: string): any {
|
|
27
|
+
return globalThis["waitForSelector"](p, s);
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
closePage(p): string {
|
|
31
|
+
return globalThis["closePage"](p);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
goto(cdpPage: CdpPage, url: string): any {
|
|
35
|
+
return globalThis["goto"](cdpPage.mainFrame()._id, url);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
newPage(): CdpPage {
|
|
39
|
+
return globalThis["newPage"]();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$(selector: string): boolean {
|
|
30
43
|
throw new Error("Method not implemented.");
|
|
31
44
|
}
|
|
32
45
|
|
|
@@ -57,8 +70,30 @@ export class PM_Node extends PM {
|
|
|
57
70
|
return globalThis["click"](selector);
|
|
58
71
|
}
|
|
59
72
|
|
|
60
|
-
|
|
61
|
-
return globalThis["
|
|
73
|
+
screencast(opts: ScreencastOptions, page: CdpPage) {
|
|
74
|
+
return globalThis["screencast"](
|
|
75
|
+
{
|
|
76
|
+
...opts,
|
|
77
|
+
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
78
|
+
},
|
|
79
|
+
page.mainFrame()._id,
|
|
80
|
+
this.testResourceConfiguration.name
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
screencastStop(p: string) {
|
|
85
|
+
return globalThis["screencastStop"](p);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
customScreenShot(opts: ScreencastOptions, cdpPage: CdpPage) {
|
|
89
|
+
return globalThis["customScreenShot"](
|
|
90
|
+
{
|
|
91
|
+
...opts,
|
|
92
|
+
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
93
|
+
},
|
|
94
|
+
cdpPage.mainFrame()._id,
|
|
95
|
+
this.testResourceConfiguration.name
|
|
96
|
+
);
|
|
62
97
|
}
|
|
63
98
|
|
|
64
99
|
existsSync(destFolder: string): boolean {
|
package/src/PM/web.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { PassThrough } from "stream";
|
|
|
3
3
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
4
4
|
|
|
5
5
|
import { PM } from "./index.js";
|
|
6
|
-
import { ScreenshotOptions } from "puppeteer-core";
|
|
6
|
+
import { ScreencastOptions, ScreenshotOptions } from "puppeteer-core";
|
|
7
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
7
8
|
|
|
8
9
|
type PuppetMasterServer = Record<string, Promise<any>>;
|
|
9
10
|
|
|
@@ -16,12 +17,39 @@ export class PM_Web extends PM {
|
|
|
16
17
|
this.testResourceConfiguration = t;
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
waitForSelector(p: string, s: string): any {
|
|
21
|
+
return window["waitForSelector"](p, s);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
screencast(opts: ScreencastOptions) {
|
|
25
|
+
return window["screencast"](
|
|
26
|
+
{
|
|
27
|
+
...opts,
|
|
28
|
+
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
29
|
+
},
|
|
30
|
+
this.testResourceConfiguration.name
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
screencastStop(recorder: string) {
|
|
35
|
+
return window["screencastStop"](recorder);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
closePage(p): string {
|
|
39
|
+
return window["closePage"](p);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
goto(p, url: string): any {
|
|
43
|
+
return window["goto"](p, url);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
newPage(): CdpPage {
|
|
47
|
+
return window["newPage"]();
|
|
48
|
+
}
|
|
49
|
+
|
|
19
50
|
$(selector: string): boolean {
|
|
20
51
|
return window["$"](selector);
|
|
21
52
|
}
|
|
22
|
-
screencast(opts: object) {
|
|
23
|
-
throw new Error("Method not implemented.");
|
|
24
|
-
}
|
|
25
53
|
|
|
26
54
|
isDisabled(selector: string): boolean {
|
|
27
55
|
return window["isDisabled"](selector);
|
|
@@ -64,7 +92,7 @@ export class PM_Web extends PM {
|
|
|
64
92
|
return window["existsSync"](destFolder);
|
|
65
93
|
}
|
|
66
94
|
|
|
67
|
-
mkdirSync() {
|
|
95
|
+
mkdirSync(x) {
|
|
68
96
|
return window["mkdirSync"](this.testResourceConfiguration.fs + "/");
|
|
69
97
|
}
|
|
70
98
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CElement } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
IBaseTest,
|
|
@@ -6,7 +7,6 @@ import {
|
|
|
6
7
|
ITestImplementation,
|
|
7
8
|
ITestSpecification,
|
|
8
9
|
} from "../../../Types";
|
|
9
|
-
import React from "react";
|
|
10
10
|
|
|
11
11
|
export type IWhenShape = any;
|
|
12
12
|
export type IThenShape = any;
|
|
@@ -29,14 +29,22 @@ export const testInterface: IPartialInterface<any> = {
|
|
|
29
29
|
// // resolve(x());
|
|
30
30
|
// // });
|
|
31
31
|
// },
|
|
32
|
-
beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
|
|
32
|
+
// beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
|
|
33
|
+
// return new Promise((resolve, rej) => {
|
|
34
|
+
// resolve(React.createElement(subject));
|
|
35
|
+
// });
|
|
36
|
+
// },
|
|
37
|
+
andWhen: async (s: IStore, whenCB): Promise<IStore> => {
|
|
38
|
+
await whenCB(s());
|
|
33
39
|
return new Promise((resolve, rej) => {
|
|
34
|
-
|
|
35
|
-
console.log("react-element", x);
|
|
36
|
-
resolve(x);
|
|
40
|
+
resolve(React.createElement(s));
|
|
37
41
|
});
|
|
42
|
+
// return whenCB(s);
|
|
38
43
|
},
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
butThen: async (subject, thenCB) => {
|
|
45
|
+
await thenCB(subject());
|
|
46
|
+
return new Promise((resolve, rej) => {
|
|
47
|
+
resolve(React.createElement(subject));
|
|
48
|
+
});
|
|
41
49
|
},
|
|
42
50
|
};
|
|
@@ -8,19 +8,31 @@ import {
|
|
|
8
8
|
testInterface as baseInterface,
|
|
9
9
|
} from "./index.js";
|
|
10
10
|
|
|
11
|
-
export default <
|
|
11
|
+
export default <
|
|
12
|
+
ITestShape extends IBaseTest<
|
|
13
|
+
IInput,
|
|
14
|
+
number,
|
|
15
|
+
number,
|
|
16
|
+
number,
|
|
17
|
+
unknown,
|
|
18
|
+
unknown,
|
|
19
|
+
unknown,
|
|
20
|
+
Record<string, any>,
|
|
21
|
+
Record<string, any>,
|
|
22
|
+
Record<string, any>,
|
|
23
|
+
Record<string, any>,
|
|
24
|
+
Record<string, any>
|
|
25
|
+
>
|
|
26
|
+
>(
|
|
12
27
|
testImplementations: ITestImpl<ITestShape>,
|
|
13
28
|
testSpecifications: ITestSpec<ITestShape>,
|
|
14
29
|
testInput: IInput,
|
|
15
|
-
testInterface: IPartialInterface<ITestShape>
|
|
30
|
+
testInterface: IPartialInterface<ITestShape> = baseInterface
|
|
16
31
|
) => {
|
|
17
32
|
return Testeranto<ITestShape>(
|
|
18
33
|
testInput,
|
|
19
34
|
testSpecifications,
|
|
20
35
|
testImplementations,
|
|
21
|
-
|
|
22
|
-
...baseInterface,
|
|
23
|
-
...testInterface,
|
|
24
|
-
}
|
|
36
|
+
testInterface
|
|
25
37
|
);
|
|
26
38
|
};
|
|
@@ -25,7 +25,7 @@ export type IStore = {
|
|
|
25
25
|
|
|
26
26
|
type ISubject = {
|
|
27
27
|
htmlElement: HTMLElement;
|
|
28
|
-
reactElement: any; //CElement<any, any>,
|
|
28
|
+
// reactElement: any; //CElement<any, any>,
|
|
29
29
|
domRoot: ReactDom.Root;
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -52,63 +52,40 @@ export default <ITestShape extends IBaseTest, IWhen, IGiven>(
|
|
|
52
52
|
testSpecifications,
|
|
53
53
|
testImplementations,
|
|
54
54
|
{
|
|
55
|
-
beforeAll: async (
|
|
55
|
+
beforeAll: async (subject, artificer): Promise<ISubject> => {
|
|
56
56
|
return await new Promise((resolve, rej) => {
|
|
57
57
|
const htmlElement = document.getElementById("root");
|
|
58
58
|
if (htmlElement) {
|
|
59
59
|
const domRoot = ReactDom.createRoot(htmlElement);
|
|
60
|
-
|
|
61
|
-
domRoot.render(
|
|
62
|
-
createElement(
|
|
63
|
-
TesterantoComponent,
|
|
64
|
-
{
|
|
65
|
-
...initialProps,
|
|
66
|
-
done: (reactElement) => {
|
|
67
|
-
resolve({
|
|
68
|
-
htmlElement,
|
|
69
|
-
reactElement,
|
|
70
|
-
domRoot,
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
[]
|
|
75
|
-
)
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// resolve({ htmlElement });
|
|
60
|
+
resolve({ domRoot, htmlElement });
|
|
79
61
|
}
|
|
80
62
|
});
|
|
81
63
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// // []
|
|
108
|
-
// // )
|
|
109
|
-
// // );
|
|
110
|
-
// });
|
|
111
|
-
// },
|
|
64
|
+
beforeEach: async (
|
|
65
|
+
{ domRoot, htmlElement },
|
|
66
|
+
initialValues,
|
|
67
|
+
testResource,
|
|
68
|
+
artificer
|
|
69
|
+
): Promise<IStore> => {
|
|
70
|
+
return new Promise(async (resolve, rej) => {
|
|
71
|
+
domRoot.render(
|
|
72
|
+
createElement(
|
|
73
|
+
TesterantoComponent,
|
|
74
|
+
{
|
|
75
|
+
...initialValues,
|
|
76
|
+
done: (reactElement) => {
|
|
77
|
+
resolve({
|
|
78
|
+
htmlElement,
|
|
79
|
+
reactElement,
|
|
80
|
+
domRoot,
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
[]
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
},
|
|
112
89
|
andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
113
90
|
return whenCB(s);
|
|
114
91
|
},
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer, { act } from "react-test-renderer";
|
|
3
|
+
|
|
3
4
|
import { ISelection, IStore } from ".";
|
|
4
5
|
|
|
5
6
|
export const testInterface = {
|
|
6
7
|
beforeEach: function (
|
|
7
8
|
CComponent,
|
|
8
|
-
propsAndChildren
|
|
9
|
+
propsAndChildren: () => any
|
|
9
10
|
): Promise<renderer.ReactTestRenderer> {
|
|
10
|
-
function Link(
|
|
11
|
-
|
|
12
|
-
const c = props.children;
|
|
13
|
-
return React.createElement(CComponent, p, c);
|
|
11
|
+
function Link(proper) {
|
|
12
|
+
return React.createElement(CComponent, proper(), []);
|
|
14
13
|
}
|
|
15
14
|
return new Promise((res, rej) => {
|
|
16
15
|
act(async () => {
|
|
17
|
-
const p = propsAndChildren;
|
|
18
|
-
const y = new CComponent(p.props);
|
|
19
16
|
const testRenderer = await renderer.create(Link(propsAndChildren));
|
|
20
17
|
res(testRenderer);
|
|
21
18
|
});
|
|
@@ -25,7 +22,6 @@ export const testInterface = {
|
|
|
25
22
|
renderer: renderer.ReactTestRenderer,
|
|
26
23
|
whenCB: any
|
|
27
24
|
): Promise<renderer.ReactTestRenderer> {
|
|
28
|
-
// console.log("andWhen", whenCB)
|
|
29
25
|
await act(() => whenCB(renderer));
|
|
30
26
|
return renderer;
|
|
31
27
|
},
|
|
@@ -34,15 +30,12 @@ export const testInterface = {
|
|
|
34
30
|
// return whenCB()(s);
|
|
35
31
|
// },
|
|
36
32
|
butThen: async function (s: IStore, thenCB, tr): Promise<ISelection> {
|
|
37
|
-
console.log("butThen", thenCB.toString());
|
|
38
33
|
return thenCB(s);
|
|
39
34
|
},
|
|
40
35
|
afterEach: async function (store: IStore, ndx, artificer) {
|
|
41
|
-
// console.log("afterEach", store);
|
|
42
36
|
return {};
|
|
43
37
|
},
|
|
44
38
|
afterAll: (store: IStore, artificer) => {
|
|
45
|
-
// console.log("afterAll", store);
|
|
46
39
|
return;
|
|
47
40
|
},
|
|
48
41
|
};
|
|
@@ -5,7 +5,22 @@ import type { ITestImpl, ITestSpec } from "../jsx-promised";
|
|
|
5
5
|
|
|
6
6
|
import { IInput, testInterface } from "./index.js";
|
|
7
7
|
|
|
8
|
-
export default <
|
|
8
|
+
export default <
|
|
9
|
+
ITestShape extends IBaseTest<
|
|
10
|
+
unknown,
|
|
11
|
+
unknown,
|
|
12
|
+
unknown,
|
|
13
|
+
unknown,
|
|
14
|
+
unknown,
|
|
15
|
+
unknown,
|
|
16
|
+
unknown,
|
|
17
|
+
Record<string, any>,
|
|
18
|
+
Record<string, any>,
|
|
19
|
+
Record<string, any>,
|
|
20
|
+
Record<string, any>,
|
|
21
|
+
Record<string, any>
|
|
22
|
+
>
|
|
23
|
+
>(
|
|
9
24
|
testImplementations: ITestImpl<ITestShape>,
|
|
10
25
|
testSpecifications: ITestSpec<ITestShape>,
|
|
11
26
|
testInput: IInput,
|