mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(gateway): narrow websocket payload types
This commit is contained in:
@@ -230,7 +230,11 @@ describe("portal HTTP proxy", () => {
|
||||
});
|
||||
const echoed = new Promise<string>((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"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user