diff options
author | Drew DeVault <ddevault@linode.com> | 2015-07-30 10:32:25 -0400 |
---|---|---|
committer | Samuel Mannehed <samuel@samuel-xps13.lan> | 2016-04-30 02:28:45 +0200 |
commit | cf0623fffa6db5a27782998a610690f9b27605bc (patch) | |
tree | 8cf96b78f426057eff4d967ddc82e2d12d1f7278 | |
parent | f6a29ddeeb5557d8f20f998038a065d04509fd9d (diff) | |
download | novnc-cf0623fffa6db5a27782998a610690f9b27605bc.tar.gz |
Fix failing test
It only makes sense to send data on a websocket if the readyState is
equal to 1.
-rw-r--r-- | tests/test.websock.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.websock.js b/tests/test.websock.js index 953a526..f708e04 100644 --- a/tests/test.websock.js +++ b/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(); |