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,366 @@
1
+ import { IPM } from "./types";
2
+
3
+ const prxy = function (pm: IPM, mappings: [string, (...x) => any][]) {
4
+ return new Proxy(pm, {
5
+ get: (target, prop, receiver) => {
6
+ for (const mapping of mappings) {
7
+ const method = mapping[0];
8
+ const arger = mapping[1];
9
+
10
+ if (prop === method) {
11
+ return (x) => target[prop](arger(x));
12
+ }
13
+ }
14
+
15
+ return (...x) => target[prop](...x);
16
+ },
17
+ });
18
+ };
19
+
20
+ export const butThenProxy = (pm: IPM, filepath: string) =>
21
+ prxy(pm, [
22
+ [
23
+ "screencast",
24
+ (opts, p) => [
25
+ {
26
+ ...opts,
27
+ path: `${filepath}/butThen/${opts.path}`,
28
+ },
29
+ p,
30
+ ],
31
+ ],
32
+
33
+ ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
34
+
35
+ [
36
+ "writeFileSync",
37
+ (fp, contents) => [`${filepath}/butThen/${fp}`, contents],
38
+ ],
39
+
40
+ [
41
+ "customScreenShot",
42
+ (opts, p) => [
43
+ {
44
+ ...opts,
45
+ path: `${filepath}/butThen/${opts.path}`,
46
+ },
47
+ p,
48
+ ],
49
+ ],
50
+ ]);
51
+
52
+ export const andWhenProxy = (pm: IPM, filepath: string) =>
53
+ prxy(pm, [
54
+ [
55
+ "screencast",
56
+ (opts, p) => [
57
+ {
58
+ ...opts,
59
+ path: `${filepath}/andWhen/${opts.path}`,
60
+ },
61
+ p,
62
+ ],
63
+ ],
64
+
65
+ ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
66
+
67
+ ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
68
+
69
+ [
70
+ "customScreenShot",
71
+ (opts, p) => [
72
+ {
73
+ ...opts,
74
+ path: `${filepath}/andWhen${opts.path}`,
75
+ },
76
+ p,
77
+ ],
78
+ ],
79
+ ]);
80
+
81
+ export const afterEachProxy = (pm: IPM, suite: string, given: string): IPM =>
82
+ prxy(pm, [
83
+ [
84
+ "screencast",
85
+ (opts, p) => [
86
+ {
87
+ ...opts,
88
+ path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
89
+ },
90
+ p,
91
+ ],
92
+ ],
93
+
94
+ ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
95
+ [
96
+ "writeFileSync",
97
+ (fp, contents) => [
98
+ `suite-${suite}/given-${given}/afterEach/${fp}`,
99
+ contents,
100
+ ],
101
+ ],
102
+
103
+ [
104
+ "customScreenShot",
105
+ (opts, p) => [
106
+ {
107
+ ...opts,
108
+ path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
109
+ },
110
+ p,
111
+ ],
112
+ ],
113
+ ]);
114
+
115
+ export const beforeEachProxy = (pm: IPM, suite: string): IPM =>
116
+ prxy(pm, [
117
+ [
118
+ "screencast",
119
+ (opts, p) => [
120
+ {
121
+ ...opts,
122
+ path: `suite-${suite}/beforeEach/${opts.path}`,
123
+ },
124
+ p,
125
+ ],
126
+ ],
127
+
128
+ [
129
+ "writeFileSync",
130
+ (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents],
131
+ ],
132
+
133
+ [
134
+ "customScreenShot",
135
+ (opts, p) => [
136
+ {
137
+ ...opts,
138
+ path: `suite-${suite}/beforeEach/${opts.path}`,
139
+ },
140
+ p,
141
+ ],
142
+ ],
143
+
144
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]],
145
+ ]);
146
+
147
+ export const beforeAllProxy = (pm: IPM, suite: string): IPM =>
148
+ prxy(pm, [
149
+ [
150
+ "writeFileSync",
151
+ (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents],
152
+ ],
153
+
154
+ [
155
+ "customScreenShot",
156
+ (opts, p) => [
157
+ {
158
+ ...opts,
159
+ path: `suite-${suite}/beforeAll/${opts.path}`,
160
+ },
161
+ p,
162
+ ],
163
+ ],
164
+
165
+ ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]],
166
+ ]);
167
+
168
+ export const afterAllProxy = (pm: IPM, suite: string): IPM =>
169
+ prxy(pm, [
170
+ ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
171
+
172
+ [
173
+ "writeFileSync",
174
+ (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents],
175
+ ],
176
+
177
+ [
178
+ "customScreenShot",
179
+ (opts, p) => [
180
+ {
181
+ ...opts,
182
+ path: `suite-${suite}/afterAll/${opts.path}`,
183
+ },
184
+ p,
185
+ ],
186
+ ],
187
+ ]);
188
+
189
+ /////////////////////////////////////////////////
190
+
191
+ // export const butThenProxy = (pm: IPM, filepath: string) => {
192
+ // return new Proxy(pm, {
193
+ // get: (target, prop, receiver) => {
194
+ // if (prop === "customScreenShot") {
195
+ // return (opts, p) =>
196
+ // target.customScreenShot(
197
+ // {
198
+ // ...opts,
199
+ // path: `${filepath}/${opts.path}`,
200
+ // },
201
+ // p
202
+ // );
203
+ // }
204
+
205
+ // if (prop === "writeFileSync") {
206
+ // return (fp, contents) => target[prop](`${filepath}/${fp}`, contents);
207
+ // }
208
+ // },
209
+ // });
210
+ // };
211
+
212
+ // export const andWhenProxy = (pm: IPM, filepath: string) => {
213
+ // return new Proxy(pm, {
214
+ // get(target, prop, receiver) {
215
+ // if (prop === "customScreenShot") {
216
+ // return (opts, p) =>
217
+ // target.customScreenShot(
218
+ // {
219
+ // ...opts,
220
+ // path: `${filepath}/${opts.path}`,
221
+ // },
222
+ // p
223
+ // );
224
+ // }
225
+ // if (prop === "writeFileSync") {
226
+ // return (fp, contents) =>
227
+ // target[prop](`${filepath}/andWhen/${fp}`, contents);
228
+ // }
229
+
230
+ // /* @ts-ignore:next-line */
231
+ // return Reflect.get(...arguments);
232
+ // },
233
+ // });
234
+ // };
235
+
236
+ // export const afterEachProxy = (pm: IPM, suite: string, given: string): IPM => {
237
+ // return new Proxy(pm, {
238
+ // get(target, prop, receiver) {
239
+ // if (prop === "customScreenShot") {
240
+ // return (opts, p) =>
241
+ // target.customScreenShot(
242
+ // {
243
+ // ...opts,
244
+ // path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
245
+ // },
246
+ // p
247
+ // );
248
+ // }
249
+
250
+ // if (prop === "writeFileSync") {
251
+ // return (fp, contents) =>
252
+ // target[prop](
253
+ // `suite-${suite}/given-${given}/afterEach/${fp}`,
254
+ // contents
255
+ // );
256
+ // }
257
+
258
+ // /* @ts-ignore:next-line */
259
+ // return Reflect.get(...arguments);
260
+ // },
261
+ // });
262
+ // };
263
+
264
+ // export const beforeAllProxy = (pm: IPM, suite: string): IPM => {
265
+ // return new Proxy(pm, {
266
+ // get(target, prop, receiver) {
267
+ // if (prop === "customScreenShot") {
268
+ // return (opts, p) =>
269
+ // target.customScreenShot(
270
+ // {
271
+ // ...opts,
272
+ // // path: `${filepath}/${opts.path}`,
273
+ // path: `suite-${suite}/beforeAll/${opts.path}`,
274
+ // },
275
+ // p
276
+ // );
277
+ // }
278
+
279
+ // if (prop === "writeFileSync") {
280
+ // return (fp, contents) =>
281
+ // target[prop](`suite-${suite}/beforeAll/${fp}`, contents);
282
+ // }
283
+
284
+ // /* @ts-ignore:next-line */
285
+ // return Reflect.get(...arguments);
286
+ // },
287
+ // });
288
+ // };
289
+
290
+ // export const beforeEachProxy = (pm: IPM, suite: string, given: string): IPM => {
291
+ // return new Proxy(pm, {
292
+ // get(target, prop, receiver) {
293
+ // // if (prop === "write") {
294
+ // // return (handle, contents) =>
295
+ // // target[prop](
296
+ // // `suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`,
297
+ // // contents
298
+ // // );
299
+ // // }
300
+
301
+ // if (prop === "createWriteStream") {
302
+ // return (fp) =>
303
+ // target[prop](`suite-${suite}/given-${given}/when/beforeEach/${fp}`);
304
+ // }
305
+
306
+ // if (prop === "writeFileSync") {
307
+ // return (fp, contents) =>
308
+ // target[prop](
309
+ // `suite-${suite}/given-${given}/when/beforeEach/${fp}`,
310
+ // contents
311
+ // );
312
+ // }
313
+
314
+ // if (prop === "customScreenShot") {
315
+ // return (opts, p) =>
316
+ // target.customScreenShot(
317
+ // {
318
+ // ...opts,
319
+ // path: `suite-${suite}/given-${given}/when/beforeEach/${opts.path}`,
320
+ // },
321
+ // p
322
+ // );
323
+ // }
324
+
325
+ // if (prop === "screencast") {
326
+ // return (opts, p) =>
327
+ // target.screencast(
328
+ // {
329
+ // ...opts,
330
+ // path: `suite-${suite}/given-${given}/when/beforeEach/${opts.path}`,
331
+ // },
332
+ // p
333
+ // );
334
+ // }
335
+
336
+ // /* @ts-ignore:next-line */
337
+ // return Reflect.get(...arguments);
338
+ // },
339
+ // });
340
+ // };
341
+
342
+ // export const afterAllProxy = (pm: IPM, suite: string): IPM => {
343
+ // return new Proxy(pm, {
344
+ // get(target, prop, receiver) {
345
+ // if (prop === "customScreenShot") {
346
+ // return (opts, p) =>
347
+ // target.customScreenShot(
348
+ // {
349
+ // ...opts,
350
+ // // path: `${filepath}/${opts.path}`,
351
+ // path: `suite-${suite}/afterAll/${opts.path}`,
352
+ // },
353
+ // p
354
+ // );
355
+ // }
356
+
357
+ // if (prop === "writeFileSync") {
358
+ // return (fp, contents) =>
359
+ // target[prop](`suite-${suite}/afterAll/${fp}`, contents);
360
+ // }
361
+
362
+ // /* @ts-ignore:next-line */
363
+ // return Reflect.get(...arguments);
364
+ // },
365
+ // });
366
+ // };