@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.cjs.js
CHANGED
|
@@ -18646,11 +18646,11 @@ const testEntitiesApi = { create };
|
|
|
18646
18646
|
class MyReporter {
|
|
18647
18647
|
constructor(options) {
|
|
18648
18648
|
this.onBegin = async (config, rootSuite) => {
|
|
18649
|
-
var _a, _b;
|
|
18649
|
+
var _a, _b, _c;
|
|
18650
18650
|
const shard = config.shard;
|
|
18651
18651
|
this.config = config;
|
|
18652
18652
|
this.currentShard = shard === null || shard === void 0 ? void 0 : shard.current;
|
|
18653
|
-
let attempts;
|
|
18653
|
+
let attempts = {};
|
|
18654
18654
|
this.totalTestCount = rootSuite.allTests().length;
|
|
18655
18655
|
try {
|
|
18656
18656
|
const runDetails = {
|
|
@@ -18674,11 +18674,12 @@ class MyReporter {
|
|
|
18674
18674
|
}));
|
|
18675
18675
|
}
|
|
18676
18676
|
catch (error) {
|
|
18677
|
-
const
|
|
18678
|
-
|
|
18677
|
+
const axiosError = error;
|
|
18678
|
+
const data = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
18679
|
+
consoleLogFormatted.error((_b = data === null || data === void 0 ? void 0 : data.error) !== null && _b !== void 0 ? _b : axiosError.message);
|
|
18679
18680
|
consoleLogFormatted.error(ERRORS.onBegin.failedToInitializeRun);
|
|
18680
18681
|
process.kill(process.pid, "SIGKILL");
|
|
18681
|
-
process.exit(1);
|
|
18682
|
+
((_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.status) === 422 && process.exit(1);
|
|
18682
18683
|
}
|
|
18683
18684
|
consoleLogFormatted.underline(MESSAGES.onBegin.testStarted);
|
|
18684
18685
|
consoleLogFormatted.dim(MESSAGES.onBegin.ciBuildId(this.ciBuildId));
|