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.
Files changed (98) hide show
  1. package/README.md +1 -3
  2. package/bin/init-docs.js +24 -0
  3. package/bundle.js +53 -0
  4. package/dist/common/dist/module/src/Init.js +40 -0
  5. package/dist/common/src/Init.js +30 -0
  6. package/dist/common/src/Node.js +5 -3
  7. package/dist/common/src/PM/main.js +136 -90
  8. package/dist/common/src/Project.js +82 -0
  9. package/dist/common/src/Puppeteer.js +0 -2
  10. package/dist/common/src/SubPackages/puppeteer.js +1 -1
  11. package/dist/common/src/SubPackages/react/jsx/index.js +14 -6
  12. package/dist/common/src/SubPackages/react/jsx/node.js +7 -2
  13. package/dist/common/src/SubPackages/react-dom/component/web.js +13 -39
  14. package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +2 -10
  15. package/dist/common/src/Web.js +25 -21
  16. package/dist/common/{run-tests.js → src/build-tests.js} +10 -5
  17. package/dist/common/src/defaultConfig.js +19 -0
  18. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +26 -16
  19. package/dist/common/src/init-docs.js +43 -0
  20. package/dist/common/src/lib/abstractBase.js +29 -248
  21. package/dist/common/src/lib/basebuilder.js +1 -11
  22. package/dist/common/src/lib/classBuilder.js +1 -1
  23. package/dist/common/src/lib/core.js +8 -26
  24. package/dist/common/{build-tests.js → src/run-tests.js} +10 -9
  25. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  26. package/dist/module/src/Init.js +30 -0
  27. package/dist/module/src/Node.js +5 -3
  28. package/dist/module/src/PM/main.js +136 -90
  29. package/dist/module/src/Project.js +82 -0
  30. package/dist/module/src/Puppeteer.js +0 -2
  31. package/dist/module/src/SubPackages/puppeteer.js +1 -1
  32. package/dist/module/src/SubPackages/react/jsx/index.js +14 -6
  33. package/dist/module/src/SubPackages/react/jsx/node.js +7 -2
  34. package/dist/module/src/SubPackages/react-dom/component/web.js +13 -39
  35. package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +2 -10
  36. package/dist/module/src/Web.js +25 -21
  37. package/dist/module/src/build-tests.js +11 -0
  38. package/dist/module/src/defaultConfig.js +17 -0
  39. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +26 -16
  40. package/dist/module/src/init-docs.js +15 -0
  41. package/dist/module/src/lib/abstractBase.js +29 -248
  42. package/dist/module/src/lib/basebuilder.js +1 -11
  43. package/dist/module/src/lib/classBuilder.js +1 -1
  44. package/dist/module/src/lib/core.js +8 -26
  45. package/dist/module/src/run-tests.js +11 -0
  46. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  47. package/dist/prebuild/build-tests.mjs +553 -0
  48. package/dist/prebuild/init-docs.mjs +48 -0
  49. package/dist/prebuild/run-tests.mjs +871 -0
  50. package/dist/types/dist/module/src/Init.d.ts +2 -0
  51. package/dist/types/src/Node.d.ts +4 -1
  52. package/dist/types/src/PM/main.d.ts +2 -1
  53. package/dist/types/src/SubPackages/react/jsx/node.d.ts +1 -1
  54. package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
  55. package/dist/types/src/Web.d.ts +2 -2
  56. package/dist/types/src/build-tests.d.ts +1 -0
  57. package/dist/types/src/defaultConfig.d.ts +3 -0
  58. package/dist/types/src/init-docs.d.ts +1 -0
  59. package/dist/types/src/lib/abstractBase.d.ts +6 -2
  60. package/dist/types/src/lib/core.d.ts +3 -3
  61. package/dist/types/src/lib/types.d.ts +5 -1
  62. package/dist/types/src/run-tests.d.ts +1 -0
  63. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  64. package/package.json +21 -24
  65. package/src/Init.ts +28 -0
  66. package/src/Node.ts +6 -3
  67. package/src/PM/main.ts +168 -110
  68. package/src/Project.ts +103 -0
  69. package/src/Puppeteer.ts +0 -2
  70. package/src/SubPackages/puppeteer.ts +1 -1
  71. package/src/SubPackages/react/jsx/index.ts +15 -7
  72. package/src/SubPackages/react/jsx/node.ts +6 -5
  73. package/src/SubPackages/react-dom/component/web.ts +28 -51
  74. package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
  75. package/src/Web.ts +45 -23
  76. package/src/build-tests.ts +12 -0
  77. package/src/defaultConfig.ts +20 -0
  78. package/src/esbuildConfigs/inputFilesPlugin.ts +46 -17
  79. package/src/init-docs.ts +19 -0
  80. package/src/lib/abstractBase.ts +38 -255
  81. package/src/lib/basebuilder.ts +1 -12
  82. package/src/lib/classBuilder.ts +2 -1
  83. package/src/lib/core.ts +17 -29
  84. package/src/lib/types.ts +3 -1
  85. package/src/run-tests.ts +12 -0
  86. package/tsconfig.json +1 -1
  87. package/build-tests.ts +0 -16
  88. package/dist/common/init-docs.js +0 -8
  89. package/dist/module/build-tests.js +0 -10
  90. package/dist/module/init-docs.js +0 -3
  91. package/dist/module/run-tests.js +0 -6
  92. package/dist/prebuild/Puppeteer.mjs +0 -82033
  93. package/dist/types/build-tests.d.ts +0 -3
  94. package/dist/types/init-docs.d.ts +0 -2
  95. package/dist/types/run-tests.d.ts +0 -2
  96. package/init-docs.ts +0 -5
  97. package/pupBuild.js +0 -18
  98. 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
- async givenThat(subject, testResource, artifactory, initializer, pm) {
40
- return fullTestInterface.beforeEach(subject, initializer, (fPath, value) =>
41
- // TODO does not work?
42
- artifactory(`beforeEach/${fPath}`, value), testResource, this.initialValues, pm);
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
+ }