testeranto 0.125.2 → 0.128.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/dist/common/src/Node.js +5 -0
  2. package/dist/common/src/PM/base.js +6 -0
  3. package/dist/common/src/PM/index.js +0 -1
  4. package/dist/common/src/PM/main.js +75 -20
  5. package/dist/common/src/PM/web.js +1 -1
  6. package/dist/common/src/ReportServer.js +39 -2
  7. package/dist/common/src/build.js +41 -6
  8. package/dist/common/src/lib/abstractBase.js +22 -107
  9. package/dist/common/src/lib/basebuilder.js +20 -21
  10. package/dist/common/src/lib/classBuilder.js +12 -1
  11. package/dist/common/src/lib/core.js +1 -8
  12. package/dist/common/src/lib/index.js +2 -5
  13. package/dist/common/src/lib/pmProxy.js +294 -0
  14. package/dist/common/testeranto.config.js +43 -34
  15. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  16. package/dist/module/src/Node.js +5 -0
  17. package/dist/module/src/PM/base.js +6 -0
  18. package/dist/module/src/PM/index.js +0 -1
  19. package/dist/module/src/PM/main.js +75 -20
  20. package/dist/module/src/PM/web.js +1 -1
  21. package/dist/module/src/Project.js +6 -6
  22. package/dist/module/src/ReportClient.js +3 -3
  23. package/dist/module/src/ReportServer.js +39 -2
  24. package/dist/module/src/build.js +41 -6
  25. package/dist/module/src/lib/abstractBase.js +22 -107
  26. package/dist/module/src/lib/basebuilder.js +20 -21
  27. package/dist/module/src/lib/classBuilder.js +12 -1
  28. package/dist/module/src/lib/core.js +1 -8
  29. package/dist/module/src/lib/index.js +2 -5
  30. package/dist/module/src/lib/pmProxy.js +285 -0
  31. package/dist/module/testeranto.config.js +40 -34
  32. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  33. package/dist/prebuild/Project.css +1 -26
  34. package/dist/prebuild/Project.js +4 -4
  35. package/dist/prebuild/ReportClient.css +1 -26
  36. package/dist/prebuild/ReportClient.js +3 -3
  37. package/dist/prebuild/ReportServer.mjs +1 -2
  38. package/dist/prebuild/TestReport.css +1 -26
  39. package/dist/prebuild/build.mjs +42 -7
  40. package/dist/prebuild/run.mjs +82 -18
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/dist/types/src/PM/web.d.ts +1 -1
  43. package/dist/types/src/Types.d.ts +2 -1
  44. package/dist/types/src/lib/abstractBase.d.ts +4 -6
  45. package/dist/types/src/lib/index.d.ts +1 -1
  46. package/dist/types/src/lib/pmProxy.d.ts +7 -0
  47. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  48. package/package.json +14 -6
  49. package/src/Init.ts +1 -0
  50. package/src/Node.ts +6 -0
  51. package/src/PM/base.ts +8 -0
  52. package/src/PM/index.ts +2 -7
  53. package/src/PM/main.ts +112 -23
  54. package/src/PM/web.ts +3 -3
  55. package/src/Project.tsx +6 -6
  56. package/src/ReportClient.tsx +3 -3
  57. package/src/ReportServer.ts +43 -2
  58. package/src/Types.ts +3 -2
  59. package/src/build.ts +47 -6
  60. package/src/lib/abstractBase.ts +45 -184
  61. package/src/lib/basebuilder.ts +25 -28
  62. package/src/lib/classBuilder.ts +13 -2
  63. package/src/lib/core.ts +10 -14
  64. package/src/lib/index.ts +6 -29
  65. package/src/lib/pmProxy.ts +366 -0
  66. package/testeranto/bundles/node/{react → redux}/metafile.json +186 -254
  67. package/testeranto/bundles/pure/redux/metafile.json +554 -0
  68. package/testeranto/bundles/web/redux/metafile.json +504 -0
  69. package/testeranto/bundles/web/{react/src/SubPackages/react-test-renderer/component → redux}/test/web.html +1 -1
  70. package/testeranto/index.html +1 -1
  71. package/testeranto/reports/{react → redux}/config.json +26 -10
  72. package/testeranto/reports/{react → redux}/index.html +5 -5
  73. package/testeranto/reports/redux/summary.json +20 -0
  74. package/testeranto.config.ts +46 -34
  75. package/tsc.log +3 -1
  76. package/testeranto/bundles/node/react/src/SubPackages/react-test-renderer/component/test/node.mjs +0 -24687
  77. package/testeranto/bundles/pure/react/metafile.json +0 -8
  78. package/testeranto/bundles/pure/react/src/SubPackages/react-test-renderer/component/test/pure.mjs +0 -24625
  79. package/testeranto/bundles/web/react/metafile.json +0 -8
  80. package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.mjs +0 -21290
  81. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/node/node/console_log.txt +0 -0
  82. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/bdd_errors.txt +0 -1
  83. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/featurePrompt.txt +0 -0
  84. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/lint_errors.json +0 -3381
  85. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/littleBoard.html +0 -20
  86. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/log.txt +0 -40
  87. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/prompt.txt +0 -24
  88. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/tests.json +0 -132
  89. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/type_errors.txt +0 -17
  90. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/bdd_errors.txt +0 -1
  91. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/console_log.txt +0 -1
  92. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/lint_errors.json +0 -2947
  93. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/littleBoard.html +0 -20
  94. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/log.txt +0 -40
  95. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/prompt.txt +0 -23
  96. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/tests.json +0 -132
  97. package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/type_errors.txt +0 -18
  98. package/testeranto/reports/react/summary.json +0 -8
@@ -0,0 +1,294 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.afterAllProxy = exports.beforeAllProxy = exports.beforeEachProxy = exports.afterEachProxy = exports.andWhenProxy = exports.butThenProxy = void 0;
4
+ const prxy = function (pm, mappings) {
5
+ return new Proxy(pm, {
6
+ get: (target, prop, receiver) => {
7
+ for (const mapping of mappings) {
8
+ const method = mapping[0];
9
+ const arger = mapping[1];
10
+ if (prop === method) {
11
+ return (x) => target[prop](arger(x));
12
+ }
13
+ }
14
+ return (...x) => target[prop](...x);
15
+ },
16
+ });
17
+ };
18
+ const butThenProxy = (pm, filepath) => prxy(pm, [
19
+ [
20
+ "screencast",
21
+ (opts, p) => [
22
+ Object.assign(Object.assign({}, opts), { path: `${filepath}/butThen/${opts.path}` }),
23
+ p,
24
+ ],
25
+ ],
26
+ ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
27
+ [
28
+ "writeFileSync",
29
+ (fp, contents) => [`${filepath}/butThen/${fp}`, contents],
30
+ ],
31
+ [
32
+ "customScreenShot",
33
+ (opts, p) => [
34
+ Object.assign(Object.assign({}, opts), { path: `${filepath}/butThen/${opts.path}` }),
35
+ p,
36
+ ],
37
+ ],
38
+ ]);
39
+ exports.butThenProxy = butThenProxy;
40
+ const andWhenProxy = (pm, filepath) => prxy(pm, [
41
+ [
42
+ "screencast",
43
+ (opts, p) => [
44
+ Object.assign(Object.assign({}, opts), { path: `${filepath}/andWhen/${opts.path}` }),
45
+ p,
46
+ ],
47
+ ],
48
+ ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
49
+ ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
50
+ [
51
+ "customScreenShot",
52
+ (opts, p) => [
53
+ Object.assign(Object.assign({}, opts), { path: `${filepath}/andWhen${opts.path}` }),
54
+ p,
55
+ ],
56
+ ],
57
+ ]);
58
+ exports.andWhenProxy = andWhenProxy;
59
+ const afterEachProxy = (pm, suite, given) => prxy(pm, [
60
+ [
61
+ "screencast",
62
+ (opts, p) => [
63
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/given-${given}/afterEach/${opts.path}` }),
64
+ p,
65
+ ],
66
+ ],
67
+ ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
68
+ [
69
+ "writeFileSync",
70
+ (fp, contents) => [
71
+ `suite-${suite}/given-${given}/afterEach/${fp}`,
72
+ contents,
73
+ ],
74
+ ],
75
+ [
76
+ "customScreenShot",
77
+ (opts, p) => [
78
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/given-${given}/afterEach/${opts.path}` }),
79
+ p,
80
+ ],
81
+ ],
82
+ ]);
83
+ exports.afterEachProxy = afterEachProxy;
84
+ const beforeEachProxy = (pm, suite) => prxy(pm, [
85
+ [
86
+ "screencast",
87
+ (opts, p) => [
88
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeEach/${opts.path}` }),
89
+ p,
90
+ ],
91
+ ],
92
+ [
93
+ "writeFileSync",
94
+ (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents],
95
+ ],
96
+ [
97
+ "customScreenShot",
98
+ (opts, p) => [
99
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeEach/${opts.path}` }),
100
+ p,
101
+ ],
102
+ ],
103
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]],
104
+ ]);
105
+ exports.beforeEachProxy = beforeEachProxy;
106
+ const beforeAllProxy = (pm, suite) => prxy(pm, [
107
+ [
108
+ "writeFileSync",
109
+ (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents],
110
+ ],
111
+ [
112
+ "customScreenShot",
113
+ (opts, p) => [
114
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeAll/${opts.path}` }),
115
+ p,
116
+ ],
117
+ ],
118
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]],
119
+ ]);
120
+ exports.beforeAllProxy = beforeAllProxy;
121
+ const afterAllProxy = (pm, suite) => prxy(pm, [
122
+ ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
123
+ [
124
+ "writeFileSync",
125
+ (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents],
126
+ ],
127
+ [
128
+ "customScreenShot",
129
+ (opts, p) => [
130
+ Object.assign(Object.assign({}, opts), { path: `suite-${suite}/afterAll/${opts.path}` }),
131
+ p,
132
+ ],
133
+ ],
134
+ ]);
135
+ exports.afterAllProxy = afterAllProxy;
136
+ /////////////////////////////////////////////////
137
+ // export const butThenProxy = (pm: IPM, filepath: string) => {
138
+ // return new Proxy(pm, {
139
+ // get: (target, prop, receiver) => {
140
+ // if (prop === "customScreenShot") {
141
+ // return (opts, p) =>
142
+ // target.customScreenShot(
143
+ // {
144
+ // ...opts,
145
+ // path: `${filepath}/${opts.path}`,
146
+ // },
147
+ // p
148
+ // );
149
+ // }
150
+ // if (prop === "writeFileSync") {
151
+ // return (fp, contents) => target[prop](`${filepath}/${fp}`, contents);
152
+ // }
153
+ // },
154
+ // });
155
+ // };
156
+ // export const andWhenProxy = (pm: IPM, filepath: string) => {
157
+ // return new Proxy(pm, {
158
+ // get(target, prop, receiver) {
159
+ // if (prop === "customScreenShot") {
160
+ // return (opts, p) =>
161
+ // target.customScreenShot(
162
+ // {
163
+ // ...opts,
164
+ // path: `${filepath}/${opts.path}`,
165
+ // },
166
+ // p
167
+ // );
168
+ // }
169
+ // if (prop === "writeFileSync") {
170
+ // return (fp, contents) =>
171
+ // target[prop](`${filepath}/andWhen/${fp}`, contents);
172
+ // }
173
+ // /* @ts-ignore:next-line */
174
+ // return Reflect.get(...arguments);
175
+ // },
176
+ // });
177
+ // };
178
+ // export const afterEachProxy = (pm: IPM, suite: string, given: string): IPM => {
179
+ // return new Proxy(pm, {
180
+ // get(target, prop, receiver) {
181
+ // if (prop === "customScreenShot") {
182
+ // return (opts, p) =>
183
+ // target.customScreenShot(
184
+ // {
185
+ // ...opts,
186
+ // path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
187
+ // },
188
+ // p
189
+ // );
190
+ // }
191
+ // if (prop === "writeFileSync") {
192
+ // return (fp, contents) =>
193
+ // target[prop](
194
+ // `suite-${suite}/given-${given}/afterEach/${fp}`,
195
+ // contents
196
+ // );
197
+ // }
198
+ // /* @ts-ignore:next-line */
199
+ // return Reflect.get(...arguments);
200
+ // },
201
+ // });
202
+ // };
203
+ // export const beforeAllProxy = (pm: IPM, suite: string): IPM => {
204
+ // return new Proxy(pm, {
205
+ // get(target, prop, receiver) {
206
+ // if (prop === "customScreenShot") {
207
+ // return (opts, p) =>
208
+ // target.customScreenShot(
209
+ // {
210
+ // ...opts,
211
+ // // path: `${filepath}/${opts.path}`,
212
+ // path: `suite-${suite}/beforeAll/${opts.path}`,
213
+ // },
214
+ // p
215
+ // );
216
+ // }
217
+ // if (prop === "writeFileSync") {
218
+ // return (fp, contents) =>
219
+ // target[prop](`suite-${suite}/beforeAll/${fp}`, contents);
220
+ // }
221
+ // /* @ts-ignore:next-line */
222
+ // return Reflect.get(...arguments);
223
+ // },
224
+ // });
225
+ // };
226
+ // export const beforeEachProxy = (pm: IPM, suite: string, given: string): IPM => {
227
+ // return new Proxy(pm, {
228
+ // get(target, prop, receiver) {
229
+ // // if (prop === "write") {
230
+ // // return (handle, contents) =>
231
+ // // target[prop](
232
+ // // `suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`,
233
+ // // contents
234
+ // // );
235
+ // // }
236
+ // if (prop === "createWriteStream") {
237
+ // return (fp) =>
238
+ // target[prop](`suite-${suite}/given-${given}/when/beforeEach/${fp}`);
239
+ // }
240
+ // if (prop === "writeFileSync") {
241
+ // return (fp, contents) =>
242
+ // target[prop](
243
+ // `suite-${suite}/given-${given}/when/beforeEach/${fp}`,
244
+ // contents
245
+ // );
246
+ // }
247
+ // if (prop === "customScreenShot") {
248
+ // return (opts, p) =>
249
+ // target.customScreenShot(
250
+ // {
251
+ // ...opts,
252
+ // path: `suite-${suite}/given-${given}/when/beforeEach/${opts.path}`,
253
+ // },
254
+ // p
255
+ // );
256
+ // }
257
+ // if (prop === "screencast") {
258
+ // return (opts, p) =>
259
+ // target.screencast(
260
+ // {
261
+ // ...opts,
262
+ // path: `suite-${suite}/given-${given}/when/beforeEach/${opts.path}`,
263
+ // },
264
+ // p
265
+ // );
266
+ // }
267
+ // /* @ts-ignore:next-line */
268
+ // return Reflect.get(...arguments);
269
+ // },
270
+ // });
271
+ // };
272
+ // export const afterAllProxy = (pm: IPM, suite: string): IPM => {
273
+ // return new Proxy(pm, {
274
+ // get(target, prop, receiver) {
275
+ // if (prop === "customScreenShot") {
276
+ // return (opts, p) =>
277
+ // target.customScreenShot(
278
+ // {
279
+ // ...opts,
280
+ // // path: `${filepath}/${opts.path}`,
281
+ // path: `suite-${suite}/afterAll/${opts.path}`,
282
+ // },
283
+ // p
284
+ // );
285
+ // }
286
+ // if (prop === "writeFileSync") {
287
+ // return (fp, contents) =>
288
+ // target[prop](`suite-${suite}/afterAll/${fp}`, contents);
289
+ // }
290
+ // /* @ts-ignore:next-line */
291
+ // return Reflect.get(...arguments);
292
+ // },
293
+ // });
294
+ // };
@@ -1,41 +1,50 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const testeranto_config_1 = __importDefault(require("testeranto_with_reduxjs_toolkit/testeranto.config"));
3
7
  const config = {
4
8
  projects: {
5
- react: {
6
- src: "src",
7
- debugger: false,
8
- minify: false,
9
- clearScreen: false,
10
- externals: [],
11
- ports: [],
12
- featureIngestor: async function (s) {
13
- return "";
14
- },
15
- tests: [
16
- [
17
- "./src/SubPackages/react-test-renderer/component/test/node.ts",
18
- "node",
19
- { ports: 0 },
20
- [],
21
- ],
22
- // [
23
- // "./src/SubPackages/react-test-renderer/component/test/web.ts",
24
- // "web",
25
- // { ports: 0 },
26
- // [],
27
- // ],
28
- // [
29
- // "./src/SubPackages/react-test-renderer/component/test/pure.ts",
30
- // "pure",
31
- // { ports: 0 },
32
- // [],
33
- // ],
34
- ],
35
- webPlugins: [],
36
- nodePlugins: [],
37
- importPlugins: [],
38
- },
9
+ redux: Object.assign(Object.assign({}, testeranto_config_1.default.projects.allTests), { src: "node_modules/testeranto_with_reduxjs_toolkit" }),
10
+ // solidity: {
11
+ // ...solidity.projects.solidity,
12
+ // src: "node_modules/testeranto-solidity",
13
+ // },
14
+ // react: {
15
+ // src: "src",
16
+ // debugger: false,
17
+ // minify: false,
18
+ // clearScreen: false,
19
+ // externals: [],
20
+ // ports: [],
21
+ // featureIngestor: async function (s: string) {
22
+ // return "";
23
+ // },
24
+ // tests: [
25
+ // [
26
+ // "./src/SubPackages/react-test-renderer/component/test/node.ts",
27
+ // "node",
28
+ // { ports: 0 },
29
+ // [],
30
+ // ],
31
+ // // [
32
+ // // "./src/SubPackages/react-test-renderer/component/test/web.ts",
33
+ // // "web",
34
+ // // { ports: 0 },
35
+ // // [],
36
+ // // ],
37
+ // // [
38
+ // // "./src/SubPackages/react-test-renderer/component/test/pure.ts",
39
+ // // "pure",
40
+ // // { ports: 0 },
41
+ // // [],
42
+ // // ],
43
+ // ],
44
+ // webPlugins: [],
45
+ // nodePlugins: [],
46
+ // importPlugins: [],
47
+ // },
39
48
  },
40
49
  };
41
50
  exports.default = config;