diff --git a/lib/testutil.js b/lib/testutil.js index b0527080..efb8603c 100644 --- a/lib/testutil.js +++ b/lib/testutil.js @@ -36,7 +36,7 @@ var addTarget = (exports.addTarget = function (proxy, path, port, websocket, tar wss.on("connection", function (ws) { ws.on("message", function (message) { var reply = extend({}, data); - reply.message = message; + reply.message = message.toString(); ws.send(JSON.stringify(reply)); }); ws.send("connected"); diff --git a/package-lock.json b/package-lock.json index 0a48b04e..b45fc5be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2033,9 +2033,9 @@ } }, "ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw==", "dev": true }, "y18n": { diff --git a/package.json b/package.json index 4537eb4d..e9900e2b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "nyc": "^15.0.0", "request": "^2.87.0", "request-promise-native": "^1.0.4", - "ws": "^7.0.0" + "ws": "^8.2.2" }, "engines": { "node": ">= 12.0" diff --git a/test/proxy_spec.js b/test/proxy_spec.js index a659f10c..8827d006 100644 --- a/test/proxy_spec.js +++ b/test/proxy_spec.js @@ -61,6 +61,7 @@ describe("Proxy Tests", function () { }); var nmsgs = 0; ws.on("message", function (msg) { + msg = msg.toString(); if (nmsgs === 0) { expect(msg).toEqual("connected"); } else {