@browsermation/test 0.0.66 → 0.0.67
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/dist/reporter.js +9 -12
- package/package.json +1 -1
package/dist/reporter.js
CHANGED
|
@@ -168,18 +168,15 @@ var BrowsermationReporter = class {
|
|
|
168
168
|
}
|
|
169
169
|
this.log(`Sending data to Browsermation: ${JSON.stringify(data)}`);
|
|
170
170
|
try {
|
|
171
|
-
const response = await fetch(
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
body: JSON.stringify(data)
|
|
181
|
-
}
|
|
182
|
-
);
|
|
171
|
+
const response = await fetch(this.browsermationURL, {
|
|
172
|
+
method: "POST",
|
|
173
|
+
headers: {
|
|
174
|
+
Accept: "application/json",
|
|
175
|
+
"Content-Type": "application/json",
|
|
176
|
+
Authorization: `Bearer ${this.apiToken}`
|
|
177
|
+
},
|
|
178
|
+
body: JSON.stringify(data)
|
|
179
|
+
});
|
|
183
180
|
if (!response.ok) {
|
|
184
181
|
this.log(
|
|
185
182
|
`Failed to send data to Browsermation. Status: ${response.status} - ${response.statusText}`
|