Send ArrayBuffer, not Uint8Array in tests
This matches the true contents of a WebSocket 'message' event, so should be a more realistic test.
This commit is contained in:
parent
775ccaa74c
commit
9b115a4485
|
@ -58,8 +58,8 @@ export default class FakeWebSocket {
|
|||
// Break apart the data to expose bugs where we assume data is
|
||||
// neatly packaged
|
||||
for (let i = 0;i < data.length;i++) {
|
||||
let buf = data.subarray(i, i+1);
|
||||
this.onmessage(new MessageEvent("message", { 'data': buf }));
|
||||
let buf = data.slice(i, i+1);
|
||||
this.onmessage(new MessageEvent("message", { 'data': buf.buffer }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue