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
|
@@ -2,28 +2,10 @@ import { DefaultTestInterface, defaultTestResourceRequirement, } from "./index.j
|
|
|
2
2
|
import { BaseSuite, BaseGiven, BaseWhen, BaseThen, BaseCheck, } from "./abstractBase.js";
|
|
3
3
|
import { ClassBuilder } from "./classBuilder.js";
|
|
4
4
|
export default class Testeranto extends ClassBuilder {
|
|
5
|
-
constructor(input, testSpecification, testImplementation, testResourceRequirement = defaultTestResourceRequirement, testInterface) {
|
|
5
|
+
constructor(input, testSpecification, testImplementation, testResourceRequirement = defaultTestResourceRequirement, testInterface, uberCatcher) {
|
|
6
6
|
const fullTestInterface = DefaultTestInterface(testInterface);
|
|
7
7
|
super(testImplementation, testSpecification, input, class extends BaseSuite {
|
|
8
8
|
afterAll(store, artifactory, pm) {
|
|
9
|
-
// const pagesHandler = {
|
|
10
|
-
// get(target, prop) {
|
|
11
|
-
// console.log(`Getting pages property ${prop}`);
|
|
12
|
-
// return target[prop];
|
|
13
|
-
// },
|
|
14
|
-
// };
|
|
15
|
-
// const browserHandler = {
|
|
16
|
-
// get(target, prop) {
|
|
17
|
-
// console.log(`Getting browser property ${prop}`);
|
|
18
|
-
// if (prop === "pages") {
|
|
19
|
-
// // return target[prop];
|
|
20
|
-
// return new Proxy(target[prop], pagesHandler);
|
|
21
|
-
// } else {
|
|
22
|
-
// return target[prop];
|
|
23
|
-
// }
|
|
24
|
-
// },
|
|
25
|
-
// };
|
|
26
|
-
// const proxy = new Proxy(utils.browser, browserHandler);
|
|
27
9
|
return fullTestInterface.afterAll(store, (fPath, value) => {
|
|
28
10
|
artifactory(`afterAll4-${this.name}/${fPath}`, value);
|
|
29
11
|
}, pm);
|
|
@@ -36,10 +18,12 @@ export default class Testeranto extends ClassBuilder {
|
|
|
36
18
|
(async (input, artifactory, tr, pm) => input))(s, this.testResourceConfiguration, artifactory, pm);
|
|
37
19
|
}
|
|
38
20
|
}, class Given extends BaseGiven {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.uberCatcher = uberCatcher;
|
|
24
|
+
}
|
|
25
|
+
async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
|
|
26
|
+
return fullTestInterface.beforeEach(subject, initializer, artifactory, testResource, initialValues, pm);
|
|
43
27
|
}
|
|
44
28
|
afterEach(store, key, artifactory, pm) {
|
|
45
29
|
return new Promise((res) => res(fullTestInterface.afterEach(store, key, (fPath, value) => artifactory(`after/${fPath}`, value), pm)));
|
|
@@ -109,8 +93,6 @@ export default class Testeranto extends ClassBuilder {
|
|
|
109
93
|
// TODO does not work?
|
|
110
94
|
artifactory(`afterEach2-${this.name}/${fPath}`, value), pm)));
|
|
111
95
|
}
|
|
112
|
-
}, testResourceRequirement
|
|
113
|
-
// puppetMaster
|
|
114
|
-
);
|
|
96
|
+
}, testResourceRequirement);
|
|
115
97
|
}
|
|
116
98
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Puppeteer from "./Puppeteer.js";
|
|
2
|
+
import process from "process";
|
|
3
|
+
if (!process.argv[2]) {
|
|
4
|
+
console.log("You didn't pass a config file");
|
|
5
|
+
process.exit(-1);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
import(process.cwd() + "/" + process.argv[2]).then((module) => {
|
|
9
|
+
Puppeteer(module.default);
|
|
10
|
+
});
|
|
11
|
+
}
|