]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/fake.websocket.js
Use fat arrow functions `const foo = () => { ... };` for callbacks
[mirror_novnc.git] / tests / fake.websocket.js
index e0290ed1e35b0492e4191fb104e83b07c250c005..2e1a3b954b90c8ceef3088bf49d909251f97e454 100644 (file)
@@ -74,7 +74,7 @@ FakeWebSocket.CLOSED = WebSocket.CLOSED;
 
 FakeWebSocket.__is_fake = true;
 
-FakeWebSocket.replace = function () {
+FakeWebSocket.replace = () => {
     if (!WebSocket.__is_fake) {
         const real_version = WebSocket;
         // eslint-disable-next-line no-global-assign
@@ -83,7 +83,7 @@ FakeWebSocket.replace = function () {
     }
 };
 
-FakeWebSocket.restore = function () {
+FakeWebSocket.restore = () => {
     if (WebSocket.__is_fake) {
         // eslint-disable-next-line no-global-assign
         WebSocket = WebSocket.__real_version;