Tidy up variable initialisation

Sort things by category, and organise everything in the same place.
We don't support reuse of RFB objects so we can safely init everything
in the constructor.
This commit is contained in:
Pierre Ossman
2017-10-14 11:24:16 +02:00
parent 30691b668e
commit c7d08d721f
2 changed files with 37 additions and 60 deletions
-6
View File
@@ -459,12 +459,6 @@ describe('Remote Frame Buffer Protocol Client', function() {
var client;
beforeEach(function () { client = make_rfb(); });
it('should reset the variable states', function () {
sinon.spy(client, '_init_vars');
client._updateConnectionState('connecting');
expect(client._init_vars).to.have.been.calledOnce;
});
it('should actually connect to the websocket', function () {
sinon.spy(client._sock, 'open');
client._updateConnectionState('connecting');