]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/test.websock.js
Add eslint and fix reported issues
[mirror_novnc.git] / tests / test.websock.js
index 106639ababe63686398af97710e3e69464a400a7..1e978ec23ebdc1eac3a3f6060e32b71b11c3b42d 100644 (file)
@@ -1,4 +1,3 @@
-var assert = chai.assert;
 var expect = chai.expect;
 
 import Websock from '../core/websock.js';
@@ -231,14 +230,15 @@ describe('Websock', function() {
 
         var sock;
         beforeEach(function () {
-           sock = new Websock();
-           WebSocket = sinon.spy();
-           WebSocket.OPEN = old_WS.OPEN;
-           WebSocket.CONNECTING = old_WS.CONNECTING;
-           WebSocket.CLOSING = old_WS.CLOSING;
-           WebSocket.CLOSED = old_WS.CLOSED;
-
-           WebSocket.prototype.binaryType = 'arraybuffer';
+            sock = new Websock();
+            // eslint-disable-next-line no-global-assign
+            WebSocket = sinon.spy();
+            WebSocket.OPEN = old_WS.OPEN;
+            WebSocket.CONNECTING = old_WS.CONNECTING;
+            WebSocket.CLOSING = old_WS.CLOSING;
+            WebSocket.CLOSED = old_WS.CLOSED;
+
+            WebSocket.prototype.binaryType = 'arraybuffer';
         });
 
         describe('opening', function () {
@@ -327,6 +327,7 @@ describe('Websock', function() {
         });
 
         after(function () {
+            // eslint-disable-next-line no-global-assign
             WebSocket = old_WS;
         });
     });