diff --git a/src/gateway/portals/portal-http-proxy.test.ts b/src/gateway/portals/portal-http-proxy.test.ts index 80b82488070a..615d7cd510d6 100644 --- a/src/gateway/portals/portal-http-proxy.test.ts +++ b/src/gateway/portals/portal-http-proxy.test.ts @@ -230,7 +230,11 @@ describe("portal HTTP proxy", () => { }); const echoed = new Promise((resolve) => { ws.once("message", (data) => { - const bytes = Array.isArray(data) ? Buffer.concat(data) : Buffer.from(data); + const bytes = Array.isArray(data) + ? Buffer.concat(data) + : data instanceof ArrayBuffer + ? Buffer.from(data) + : data; resolve(bytes.toString("utf8")); }); });