瀏覽代碼

Fix failing test

It only makes sense to send data on a websocket if the readyState is
equal to 1.
Drew DeVault 10 年之前
父節點
當前提交
cf0623fffa
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tests/test.websock.js

+ 1 - 0
tests/test.websock.js

@@ -173,6 +173,7 @@ describe('Websock', function() {
             it('should actually send on the websocket if the websocket does not have too much buffered', function () {
                 sock.maxBufferedAmount = 10;
                 sock._websocket.bufferedAmount = 8;
+                sock._websocket.readyState = WebSocket.OPEN
                 sock._sQ = new Uint8Array([1, 2, 3]);
                 sock._sQlen = 3;
                 var encoded = sock._encode_message();