From f5d810c851a1a6a90a8993ff23dc7f76d54194e7 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 9 Aug 2024 20:33:11 +0700 Subject: [PATCH] Formatting --- lib/server.js | 6 +++--- main.js | 10 +++++----- test/testServer.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/server.js b/lib/server.js index 9848643..6d18703 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1,8 +1,8 @@ 'use strict'; -const mqtt = require('mqtt-connection'); -const net = require('net'); -const types = require('./datapoints'); +const net = require('node:net'); +const mqtt = require('mqtt-connection'); +const types = require('./datapoints'); // const memwatch = require('memwatch-next'); // const heapdump = require('heapdump'); const hueCalc = true; diff --git a/main.js b/main.js index 1909b25..c7aed06 100644 --- a/main.js +++ b/main.js @@ -2,18 +2,18 @@ * * ioBroker sonoff Adapter * - * (c) 2017-2023 bluefox + * (c) 2017-2024 bluefox * * MIT License * */ 'use strict'; -const utils = require('@iobroker/adapter-core'); // Get common adapter utils +const utils = require('@iobroker/adapter-core'); // Get common adapter utils const adapterName = require('./package.json').name.split('.').pop(); -const Server = require('./lib/server'); -let server = null; -let adapter; +const Server = require('./lib/server'); +let server = null; +let adapter; function decrypt(key, value) { let result = ''; diff --git a/test/testServer.js b/test/testServer.js index 9bb4820..07d4ffd 100644 --- a/test/testServer.js +++ b/test/testServer.js @@ -251,7 +251,7 @@ describe('Sonoff server: Test mqtt server', () => { })(r, rules[r]); } - // give time to client to receive all messages + // give time to a client to receive all messages it('wait', done => { setTimeout(() => done(), 1000); }).timeout(3000);