@bigbinary/neeto-playwright-reporter 1.3.16 → 1.3.18
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 +5 -3
- package/index.cjs.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +5 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@playwright/test/reporter';
|
|
2
3
|
|
|
3
4
|
interface ReporterOptionParams {
|
|
@@ -19,6 +20,7 @@ declare class MyReporter implements Reporter {
|
|
|
19
20
|
unreportedAttemptCount: number;
|
|
20
21
|
hasRunStarted: boolean;
|
|
21
22
|
testAttemptIds: string[];
|
|
23
|
+
heartbeatInterval: NodeJS.Timeout | null;
|
|
22
24
|
constructor(options: ReporterOptionParams);
|
|
23
25
|
onBegin: (config: FullConfig, rootSuite: Suite) => Promise<void>;
|
|
24
26
|
onTestBegin: ({ id, title }: TestCase, { retry }: TestResult) => Promise<void>;
|
package/index.js
CHANGED
|
@@ -18599,8 +18599,8 @@ const sendHeartBeatSignal = async (ciBuildId) => {
|
|
|
18599
18599
|
await runsApi.heartbeat(ciBuildId);
|
|
18600
18600
|
}
|
|
18601
18601
|
catch (error) {
|
|
18602
|
-
consoleLogFormatted.
|
|
18603
|
-
consoleLogFormatted.
|
|
18602
|
+
consoleLogFormatted.error(error.message);
|
|
18603
|
+
consoleLogFormatted.redText(ERRORS.heartbeat.stopped);
|
|
18604
18604
|
process.exit(1);
|
|
18605
18605
|
}
|
|
18606
18606
|
};
|
|
@@ -18668,7 +18668,7 @@ class MyReporter {
|
|
|
18668
18668
|
consoleLogFormatted.dim(MESSAGES.onBegin.currentShard(shard.current));
|
|
18669
18669
|
}
|
|
18670
18670
|
await sendHeartBeatSignal(this.ciBuildId);
|
|
18671
|
-
setInterval(async () => await sendHeartBeatSignal(this.ciBuildId),
|
|
18671
|
+
this.heartbeatInterval = setInterval(async () => await sendHeartBeatSignal(this.ciBuildId), 45000);
|
|
18672
18672
|
this.attempts = attempts;
|
|
18673
18673
|
};
|
|
18674
18674
|
this.onTestBegin = async ({ id, title }, { retry }) => {
|
|
@@ -18775,6 +18775,7 @@ class MyReporter {
|
|
|
18775
18775
|
}
|
|
18776
18776
|
finally {
|
|
18777
18777
|
consoleLogFormatted.invertBackground(MESSAGES.onEnd.runReported);
|
|
18778
|
+
clearInterval(this.heartbeatInterval);
|
|
18778
18779
|
}
|
|
18779
18780
|
};
|
|
18780
18781
|
initializeAxios(options);
|
|
@@ -18787,6 +18788,7 @@ class MyReporter {
|
|
|
18787
18788
|
this.unreportedAttemptCount = 0;
|
|
18788
18789
|
this.hasRunStarted = false;
|
|
18789
18790
|
this.testAttemptIds = [];
|
|
18791
|
+
this.heartbeatInterval = null;
|
|
18790
18792
|
process.on("unhandledRejection", async (error) => {
|
|
18791
18793
|
var _a, _b, _c;
|
|
18792
18794
|
const data = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data;
|