@browsermation/test 0.0.39 → 0.0.40
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/bin/cli.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -42258,7 +42258,7 @@ var {
|
|
|
42258
42258
|
// package.json
|
|
42259
42259
|
var package_default = {
|
|
42260
42260
|
name: "@browsermation/test",
|
|
42261
|
-
version: "0.0.
|
|
42261
|
+
version: "0.0.40",
|
|
42262
42262
|
description: "The testing platform for Playwright by Browsermation.",
|
|
42263
42263
|
main: "./dist/index.js",
|
|
42264
42264
|
types: "./dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -626,6 +626,7 @@ async function fetchEndpoint() {
|
|
|
626
626
|
return reject(new Error(`HTTP status code ${res.statusCode} received`));
|
|
627
627
|
}
|
|
628
628
|
res.on("error", (err) => {
|
|
629
|
+
console.log("err", err);
|
|
629
630
|
console.error(
|
|
630
631
|
source_default.red.bold("\u274C Error: Failed to fetch WebSocket endpoint.")
|
|
631
632
|
);
|
|
@@ -636,9 +637,8 @@ async function fetchEndpoint() {
|
|
|
636
637
|
console.log("Received chunk:", chunk.toString());
|
|
637
638
|
}
|
|
638
639
|
try {
|
|
639
|
-
const parsedData = JSON.parse(chunk.toString());
|
|
640
|
+
const parsedData = JSON.parse(chunk.toString().trim());
|
|
640
641
|
if (parsedData.type === "ws-endpoint") {
|
|
641
|
-
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
642
642
|
resolve(parsedData.wsEndpoint);
|
|
643
643
|
res.destroy();
|
|
644
644
|
}
|