@bigbinary/neeto-playwright-reporter 1.3.18 → 1.3.19
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/index.cjs.js +6 -5
- package/index.cjs.js.map +1 -1
- package/index.js +6 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -18627,11 +18627,11 @@ const testEntitiesApi = { create };
|
|
|
18627
18627
|
class MyReporter {
|
|
18628
18628
|
constructor(options) {
|
|
18629
18629
|
this.onBegin = async (config, rootSuite) => {
|
|
18630
|
-
var _a, _b;
|
|
18630
|
+
var _a, _b, _c;
|
|
18631
18631
|
const shard = config.shard;
|
|
18632
18632
|
this.config = config;
|
|
18633
18633
|
this.currentShard = shard === null || shard === void 0 ? void 0 : shard.current;
|
|
18634
|
-
let attempts;
|
|
18634
|
+
let attempts = {};
|
|
18635
18635
|
this.totalTestCount = rootSuite.allTests().length;
|
|
18636
18636
|
try {
|
|
18637
18637
|
const runDetails = {
|
|
@@ -18655,11 +18655,12 @@ class MyReporter {
|
|
|
18655
18655
|
}));
|
|
18656
18656
|
}
|
|
18657
18657
|
catch (error) {
|
|
18658
|
-
const
|
|
18659
|
-
|
|
18658
|
+
const axiosError = error;
|
|
18659
|
+
const data = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
18660
|
+
consoleLogFormatted.error((_b = data === null || data === void 0 ? void 0 : data.error) !== null && _b !== void 0 ? _b : axiosError.message);
|
|
18660
18661
|
consoleLogFormatted.error(ERRORS.onBegin.failedToInitializeRun);
|
|
18661
18662
|
process.kill(process.pid, "SIGKILL");
|
|
18662
|
-
process.exit(1);
|
|
18663
|
+
((_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.status) === 422 && process.exit(1);
|
|
18663
18664
|
}
|
|
18664
18665
|
consoleLogFormatted.underline(MESSAGES.onBegin.testStarted);
|
|
18665
18666
|
consoleLogFormatted.dim(MESSAGES.onBegin.ciBuildId(this.ciBuildId));
|