@browsermation/test 0.0.63-beta.4 → 0.0.63-beta.5

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 (2) hide show
  1. package/dist/reporter.js +9 -0
  2. package/package.json +1 -1
package/dist/reporter.js CHANGED
@@ -47,6 +47,11 @@ var BrowsermationReporter = class {
47
47
  this.log(
48
48
  "Using API Token: " + (this.apiToken ? this.apiToken.slice(0, 4) + "****" : "not set")
49
49
  );
50
+ if (!this.apiToken) {
51
+ console.warn(
52
+ "Warning: No API token set for Browsermation Reporter. Set BM_API_TOKEN environment variable or pass apiToken in reporter options."
53
+ );
54
+ }
50
55
  }
51
56
  async getCurrentBranch() {
52
57
  return new Promise((resolve) => {
@@ -76,6 +81,10 @@ var BrowsermationReporter = class {
76
81
  });
77
82
  }
78
83
  async sendData(data) {
84
+ if (!this.apiToken) {
85
+ this.log("API token not set. Skipping sending data to Browsermation.");
86
+ return;
87
+ }
79
88
  this.log(`Sending data to Browsermation: ${JSON.stringify(data)}`);
80
89
  try {
81
90
  const response = await fetch(this.browsermationURL, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsermation/test",
3
- "version": "0.0.63-beta.4",
3
+ "version": "0.0.63-beta.5",
4
4
  "description": "The testing platform for Playwright by Browsermation.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",