testeranto 0.173.0 → 0.177.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 (145) hide show
  1. package/dist/common/src/PM/base.js +5 -5
  2. package/dist/common/src/PM/main.js +48 -52
  3. package/dist/common/src/PM/node.js +4 -1
  4. package/dist/common/src/PM/pure.js +4 -1
  5. package/dist/common/src/PM/web.js +4 -1
  6. package/dist/common/src/Pure.js +0 -4
  7. package/dist/common/src/Pure.test.js +1 -1
  8. package/dist/common/src/ReportServerLib.js +11 -5
  9. package/dist/common/src/esbuildConfigs/node.js +1 -3
  10. package/dist/common/src/lib/BaseSuite.js +13 -11
  11. package/dist/common/src/lib/abstractBase.js +39 -42
  12. package/dist/common/src/lib/basebuilder.js +5 -0
  13. package/dist/common/src/lib/core.js +1 -0
  14. package/dist/common/src/lib/pmProxy.js +210 -100
  15. package/dist/common/src/lib/pmProxy.test/adapter.js +2 -2
  16. package/dist/common/src/lib/pmProxy.test/implementation.js +1 -1
  17. package/dist/common/testeranto.config.js +39 -39
  18. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  19. package/dist/module/src/PM/base.js +5 -5
  20. package/dist/module/src/PM/main.js +13 -17
  21. package/dist/module/src/PM/node.js +4 -1
  22. package/dist/module/src/PM/pure.js +4 -1
  23. package/dist/module/src/PM/web.js +4 -1
  24. package/dist/module/src/Pure.js +0 -4
  25. package/dist/module/src/Pure.test.js +1 -1
  26. package/dist/module/src/ReportServerLib.js +11 -5
  27. package/dist/module/src/esbuildConfigs/node.js +1 -3
  28. package/dist/module/src/lib/BaseSuite.js +13 -11
  29. package/dist/module/src/lib/abstractBase.js +39 -42
  30. package/dist/module/src/lib/basebuilder.js +5 -0
  31. package/dist/module/src/lib/core.js +1 -0
  32. package/dist/module/src/lib/pmProxy.js +210 -100
  33. package/dist/module/src/lib/pmProxy.test/adapter.js +2 -2
  34. package/dist/module/src/lib/pmProxy.test/implementation.js +1 -1
  35. package/dist/module/testeranto.config.js +39 -39
  36. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  37. package/dist/prebuild/ReportServer.mjs +10 -4
  38. package/dist/prebuild/build.mjs +1 -1
  39. package/dist/prebuild/run.mjs +19 -22
  40. package/dist/types/src/PM/base.d.ts +1 -1
  41. package/dist/types/src/PM/node.d.ts +1 -1
  42. package/dist/types/src/PM/pure.d.ts +1 -1
  43. package/dist/types/src/PM/web.d.ts +1 -1
  44. package/dist/types/src/ReportServerLib.d.ts +1 -2
  45. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  46. package/dist/types/src/lib/abstractBase.d.ts +4 -6
  47. package/dist/types/src/lib/pmProxy.d.ts +3 -3
  48. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  49. package/package.json +2 -2
  50. package/src/PM/base.ts +6 -9
  51. package/src/PM/main.ts +17 -20
  52. package/src/PM/node.ts +6 -1
  53. package/src/PM/pure.ts +6 -1
  54. package/src/PM/web.ts +5 -1
  55. package/src/Pure.test.ts +6 -6
  56. package/src/Pure.ts +0 -8
  57. package/src/ReportServerLib.ts +10 -7
  58. package/src/esbuildConfigs/node.ts +1 -1
  59. package/src/lib/BaseSuite.ts +16 -21
  60. package/src/lib/abstractBase.ts +57 -49
  61. package/src/lib/basebuilder.ts +6 -0
  62. package/src/lib/core.ts +1 -0
  63. package/src/lib/pmProxy.test/adapter.ts +2 -2
  64. package/src/lib/pmProxy.test/implementation.ts +3 -3
  65. package/src/lib/pmProxy.test/types.ts +0 -2
  66. package/src/lib/pmProxy.ts +224 -92
  67. package/testeranto/bundles/node/core/metafile.json +2 -480
  68. package/testeranto/bundles/pure/core/metafile.json +3 -621
  69. package/testeranto/bundles/web/core/metafile.json +14384 -78
  70. package/testeranto/bundles/web/core/src/{lib/baseBuilder.test/baseBuilder.test.web.html → components/pure/ProjectPageView.test/index.html} +2 -2
  71. package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +39991 -0
  72. package/testeranto/projects.json +0 -1
  73. package/testeranto/reports/core/config.json +5 -5
  74. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +18 -0
  75. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/logs.txt +59 -0
  76. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  77. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +27 -0
  78. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-0/butThen/happyPath.png +0 -0
  79. package/testeranto/reports/{staticSite/src/ReportServer.test.ts/index/node → core/src/components/pure/ProjectPageView.test/index/web}/type_errors.txt +20 -22
  80. package/testeranto/reports/core/summary.json +5 -19
  81. package/testeranto.config.ts +39 -39
  82. package/tsc.log +78 -92
  83. package/testeranto/bundles/node/allTests/metafile.json +0 -486
  84. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -1182
  85. package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -1182
  86. package/testeranto/bundles/node/staticSite/metafile.json +0 -593
  87. package/testeranto/bundles/node/staticSite/src/ReportServer.test.ts/index.mjs +0 -1594
  88. package/testeranto/bundles/pure/allTests/metafile.json +0 -626
  89. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -1094
  90. package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -1094
  91. package/testeranto/bundles/pure/staticSite/metafile.json +0 -8
  92. package/testeranto/bundles/web/allTests/metafile.json +0 -780
  93. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -19
  94. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -1092
  95. package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -1092
  96. package/testeranto/bundles/web/staticSite/metafile.json +0 -8
  97. package/testeranto/reports/allTests/config.json +0 -40
  98. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
  99. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -2
  100. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -33
  101. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
  102. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -26
  103. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
  104. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -69
  105. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -74
  106. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -2
  107. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
  108. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -26
  109. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -74
  110. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
  111. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -2
  112. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -63
  113. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
  114. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -26
  115. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
  116. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -69
  117. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -74
  118. package/testeranto/reports/allTests/summary.json +0 -23
  119. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
  120. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -2
  121. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -32
  122. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
  123. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -26
  124. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
  125. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -69
  126. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -74
  127. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -2
  128. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
  129. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -26
  130. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -74
  131. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
  132. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -2
  133. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -61
  134. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
  135. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -26
  136. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
  137. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -69
  138. package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -74
  139. package/testeranto/reports/staticSite/config.json +0 -24
  140. package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/lint_errors.txt +0 -5
  141. package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/logs.txt +0 -44
  142. package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/message.txt +0 -2
  143. package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/prompt.txt +0 -23
  144. package/testeranto/reports/staticSite/summary.json +0 -9
  145. package/testeranto/reportsnode_build_errors +0 -17
@@ -8,9 +8,14 @@ export type IProxyBase = (
8
8
  mappings: [string, (...x: any) => any][]
9
9
  ) => IPM;
10
10
 
11
- export type IProxy = (pm: IPM, filepath: string) => IPM;
12
- export type IProxyAfterEach = (pm: IPM, suite: string, given: string) => IPM;
13
- export type IProxyBeforeEach = (pm: IPM, suite: string) => IPM;
11
+ export type IProxy = (pm: IPM, filepath: string, step: any) => IPM;
12
+ export type IProxyAfterEach = (
13
+ pm: IPM,
14
+ suite: string,
15
+ given: string,
16
+ step: any
17
+ ) => IPM;
18
+ export type IProxyBeforeEach = (pm: IPM, suite: string, step: any) => IPM;
14
19
 
15
20
  export type IProxiedFunctions =
16
21
  | "screencast"
@@ -38,13 +43,31 @@ const baseProxy: IProxyBase = function (
38
43
  });
39
44
  };
40
45
 
41
- export const butThenProxy: IProxy = (pm: IPM, filepath: string) => {
46
+ export const butThenProxy: IProxy = (
47
+ pm: IPM,
48
+ filepath: string,
49
+ addArtifact
50
+ ) => {
42
51
  return baseProxy(pm, [
43
52
  [
44
53
  "screencast",
45
54
  (opts, p) => {
46
55
  const path = `${filepath}/butThen/${opts.path}`;
47
- (pm as any).currentStep?.artifacts?.push(path);
56
+ addArtifact(path);
57
+ // console.log(
58
+ // `[ARTIFACT] Preparing to add to ${step.constructor.name}:`,
59
+ // path
60
+ // );
61
+ // try {
62
+
63
+ // console.log(
64
+ // `[ARTIFACT] Successfully added to ${step.constructor.name}`
65
+ // );
66
+ // console.log(`[ARTIFACT] Current artifacts:`, JSON.stringify(step.artifacts));
67
+ // } catch (e) {
68
+ // console.error(`[ARTIFACT] Failed to add ${path}:`, e);
69
+ // throw e;
70
+ // }
48
71
  return [
49
72
  {
50
73
  ...opts,
@@ -54,30 +77,27 @@ export const butThenProxy: IProxy = (pm: IPM, filepath: string) => {
54
77
  ];
55
78
  },
56
79
  ],
57
-
58
80
  [
59
81
  "createWriteStream",
60
82
  (fp) => {
61
83
  const path = `${filepath}/butThen/${fp}`;
62
- (pm as any).currentStep?.artifacts?.push(path);
84
+ addArtifact(path);
63
85
  return [path];
64
86
  },
65
87
  ],
66
-
67
88
  [
68
89
  "writeFileSync",
69
90
  (fp, contents) => {
70
91
  const path = `${filepath}/butThen/${fp}`;
71
- (pm as any).currentStep?.artifacts?.push(path);
92
+ addArtifact(path);
72
93
  return [path, contents];
73
94
  },
74
95
  ],
75
-
76
96
  [
77
97
  "customScreenShot",
78
98
  (opts, p) => {
79
99
  const path = `${filepath}/butThen/${opts.path}`;
80
- (pm as any).currentStep?.artifacts?.push(path);
100
+ addArtifact(path);
81
101
  return [
82
102
  {
83
103
  ...opts,
@@ -90,146 +110,258 @@ export const butThenProxy: IProxy = (pm: IPM, filepath: string) => {
90
110
  ]);
91
111
  };
92
112
 
93
- export const andWhenProxy: IProxy = (pm: IPM, filepath: string) =>
94
- baseProxy(pm, [
113
+ export const andWhenProxy: IProxy = (
114
+ pm: IPM,
115
+ filepath: string,
116
+ addArtifact
117
+ ) => {
118
+ return baseProxy(pm, [
95
119
  [
96
120
  "screencast",
97
- (opts, p) => [
98
- {
99
- ...opts,
100
- path: `${filepath}/andWhen/${opts.path}`,
101
- },
102
- p,
103
- ],
121
+ (opts, p) => {
122
+ const path = `${filepath}/andWhen/${opts.path}`;
123
+ addArtifact(path);
124
+ return [
125
+ {
126
+ ...opts,
127
+ path,
128
+ },
129
+ p,
130
+ ];
131
+ },
104
132
  ],
105
133
 
106
- ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
134
+ [
135
+ "createWriteStream",
136
+ (fp) => {
137
+ const path = `${filepath}/andWhen/${fp}`;
138
+ addArtifact(path);
139
+ return [path];
140
+ },
141
+ ],
107
142
 
108
- ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
143
+ [
144
+ "writeFileSync",
145
+ (fp, contents) => {
146
+ const path = `${filepath}/andWhen/${fp}`;
147
+ addArtifact(path);
148
+ return [path, contents];
149
+ },
150
+ ],
109
151
 
110
152
  [
111
153
  "customScreenShot",
112
- (opts, p) => [
113
- {
114
- ...opts,
115
- path: `${filepath}/andWhen${opts.path}`,
116
- },
117
- p,
118
- ],
154
+ (opts, p) => {
155
+ const path = `${filepath}/andWhen/${opts.path}`;
156
+ // console.log("STEP2", JSON.stringify(step));
157
+ addArtifact(path);
158
+ return [
159
+ {
160
+ ...opts,
161
+ path,
162
+ },
163
+ p,
164
+ ];
165
+ },
119
166
  ],
120
167
  ]);
168
+ };
121
169
 
122
170
  export const afterEachProxy: IProxyAfterEach = (
123
171
  pm: IPM,
124
172
  suite: string,
125
- given: string
126
- ): IPM =>
127
- baseProxy(pm, [
173
+ given: string,
174
+ addArtifact
175
+ ): IPM => {
176
+ return baseProxy(pm, [
128
177
  [
129
178
  "screencast",
130
- (opts, p) => [
131
- {
132
- ...opts,
133
- path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
134
- },
135
- p,
136
- ],
179
+ (opts, p) => {
180
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
181
+ addArtifact(path);
182
+ return [
183
+ {
184
+ ...opts,
185
+ path,
186
+ },
187
+ p,
188
+ ];
189
+ },
137
190
  ],
138
191
 
139
- ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
192
+ [
193
+ "createWriteStream",
194
+ (fp) => {
195
+ const path = `suite-${suite}/afterEach/${fp}`;
196
+ addArtifact(path);
197
+ return [path];
198
+ },
199
+ ],
140
200
  [
141
201
  "writeFileSync",
142
- (fp, contents) => [
143
- `suite-${suite}/given-${given}/afterEach/${fp}`,
144
- contents,
145
- ],
202
+ (fp, contents) => {
203
+ const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
204
+ addArtifact(path);
205
+ return [path, contents];
206
+ },
146
207
  ],
147
208
 
148
209
  [
149
210
  "customScreenShot",
150
- (opts, p) => [
151
- {
152
- ...opts,
153
- path: `suite-${suite}/given-${given}/afterEach/${opts.path}`,
154
- },
155
- p,
156
- ],
211
+ (opts, p) => {
212
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
213
+ addArtifact(path);
214
+ // console.log("STEP3", JSON.stringify(step));
215
+ return [
216
+ {
217
+ ...opts,
218
+ path,
219
+ },
220
+ p,
221
+ ];
222
+ },
157
223
  ],
158
224
  ]);
225
+ };
159
226
 
160
227
  export const beforeEachProxy: IProxyBeforeEach = (
161
228
  pm: IPM,
162
- suite: string
163
- ): IPM =>
164
- baseProxy(pm, [
229
+ suite: string,
230
+ addArtifact
231
+ ): IPM => {
232
+ return baseProxy(pm, [
165
233
  [
166
234
  "screencast",
167
- (opts, p) => [
168
- {
169
- ...opts,
170
- path: `suite-${suite}/beforeEach/${opts.path}`,
171
- },
172
- p,
173
- ],
235
+ (opts, p) => {
236
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
237
+ addArtifact(path);
238
+
239
+ return [
240
+ {
241
+ ...opts,
242
+ path,
243
+ },
244
+ p,
245
+ ];
246
+ },
174
247
  ],
175
248
 
176
249
  [
177
250
  "writeFileSync",
178
- (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents],
251
+ (fp, contents) => {
252
+ const path = `suite-${suite}/beforeEach/${fp}`;
253
+ addArtifact(path);
254
+ return [path, contents];
255
+ },
179
256
  ],
180
257
 
181
258
  [
182
259
  "customScreenShot",
183
- (opts, p) => [
184
- {
185
- ...opts,
186
- path: `suite-${suite}/beforeEach/${opts.path}`,
187
- },
188
- p,
189
- ],
260
+ (opts, p) => {
261
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
262
+ addArtifact(path);
263
+ return [
264
+ {
265
+ ...opts,
266
+ path,
267
+ },
268
+ p,
269
+ ];
270
+ },
190
271
  ],
191
272
 
192
- ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]],
273
+ [
274
+ "createWriteStream",
275
+ (fp) => {
276
+ const path = `suite-${suite}/beforeEach/${fp}`;
277
+ addArtifact(path);
278
+ return [path];
279
+ },
280
+ ],
193
281
  ]);
282
+ };
194
283
 
195
- export const beforeAllProxy: IProxy = (pm: IPM, suite: string): IPM =>
196
- baseProxy(pm, [
284
+ export const beforeAllProxy: IProxy = (
285
+ pm: IPM,
286
+ suite: string,
287
+ addArtifact
288
+ ): IPM => {
289
+ return baseProxy(pm, [
197
290
  [
198
291
  "writeFileSync",
199
- (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents],
292
+ (fp, contents) => {
293
+ const path = `suite-${suite}/beforeAll/${fp}`;
294
+ addArtifact(path);
295
+
296
+ return [path, contents];
297
+ },
200
298
  ],
201
299
 
202
300
  [
203
301
  "customScreenShot",
204
- (opts, p) => [
205
- {
206
- ...opts,
207
- path: `suite-${suite}/beforeAll/${opts.path}`,
208
- },
209
- p,
210
- ],
302
+ (opts, p) => {
303
+ const path = `suite-${suite}/beforeAll/${opts.path}`;
304
+ addArtifact(path);
305
+ return [
306
+ {
307
+ ...opts,
308
+ path,
309
+ },
310
+ p,
311
+ ];
312
+ },
211
313
  ],
212
314
 
213
- ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]],
315
+ [
316
+ "createWriteStream",
317
+ (fp) => {
318
+ const path = `suite-${suite}/beforeAll/${fp}`;
319
+ addArtifact(path);
320
+ return [path];
321
+ },
322
+ ],
214
323
  ]);
324
+ };
215
325
 
216
- export const afterAllProxy: IProxy = (pm: IPM, suite: string): IPM =>
217
- baseProxy(pm, [
218
- ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
326
+ export const afterAllProxy: IProxy = (
327
+ pm: IPM,
328
+ suite: string,
329
+ addArtifact
330
+ ): IPM => {
331
+ return baseProxy(pm, [
332
+ [
333
+ "createWriteStream",
334
+ (fp) => {
335
+ const path = `suite-${suite}/afterAll/${fp}`;
336
+ addArtifact(path);
337
+ return [path];
338
+ },
339
+ ],
219
340
 
220
341
  [
221
342
  "writeFileSync",
222
- (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents],
343
+ (fp, contents) => {
344
+ const path = `suite-${suite}/afterAll/${fp}`;
345
+ console.log("MARK10");
346
+ addArtifact(path);
347
+ return [path, contents];
348
+ },
223
349
  ],
224
350
 
225
351
  [
226
352
  "customScreenShot",
227
- (opts, p) => [
228
- {
229
- ...opts,
230
- path: `suite-${suite}/afterAll/${opts.path}`,
231
- },
232
- p,
233
- ],
353
+ (opts, p) => {
354
+ const path = `suite-${suite}/afterAll/${opts.path}`;
355
+ addArtifact(path);
356
+ console.log("MARK9");
357
+ return [
358
+ {
359
+ ...opts,
360
+ path,
361
+ },
362
+ p,
363
+ ];
364
+ },
234
365
  ],
235
366
  ]);
367
+ };