From 6d1519f38b0ef9e658f86a46d4ea9673b0552b7e Mon Sep 17 00:00:00 2001 From: Manfred Martin Date: Mon, 21 Oct 2024 16:32:52 +0200 Subject: [PATCH] Fix UT --- app/triggers/providers/discord/Discord.js | 2 +- app/triggers/providers/mqtt/Hass.test.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/triggers/providers/discord/Discord.js b/app/triggers/providers/discord/Discord.js index e0bbd85c..6be027f4 100644 --- a/app/triggers/providers/discord/Discord.js +++ b/app/triggers/providers/discord/Discord.js @@ -15,7 +15,7 @@ class Discord extends Trigger { url: this.joi.string().uri({ scheme: ['https'], }).required(), - botusername: this.joi.string().default("WUD"), + botusername: this.joi.string().default('WUD'), cardcolor: this.joi.number().default(65280), cardlabel: this.joi.string().default(''), }); diff --git a/app/triggers/providers/mqtt/Hass.test.js b/app/triggers/providers/mqtt/Hass.test.js index aa483d90..c11e03fb 100644 --- a/app/triggers/providers/mqtt/Hass.test.js +++ b/app/triggers/providers/mqtt/Hass.test.js @@ -39,7 +39,7 @@ test('publishDiscoveryMessage must publish a discovery message expected by HA', identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', - name: "WUD", + name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', @@ -65,7 +65,7 @@ test('addContainerSensor must publish sensor discovery message expected by HA', ], manufacturer: 'WUD', model: 'WUD', - name: "WUD", + name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', @@ -101,7 +101,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_total_count', name: 'Total container count', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -113,7 +113,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_update_count', name: 'Total container update count', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -125,7 +125,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_update_status', name: 'Total container update status', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUDWud', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUDWud', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -139,7 +139,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_watcher-name_total_count', name: 'Watcher watcher-name container count', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -151,7 +151,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_watcher-name_update_count', name: 'Watcher watcher-name container update count', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -163,7 +163,7 @@ test('updateContainerSensors must publish all sensors expected by HA', async () object_id: 'topic_watcher-name_update_status', name: 'Watcher watcher-name container update status', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png', @@ -204,7 +204,7 @@ test('updateWatcherSensors must publish all watcher sensor messages expected by object_id: 'topic_watcher-name_running', name: 'Watcher watcher-name running status', device: { - identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: "WUD", sw_version: 'unknown', + identifiers: ['wud'], manufacturer: 'WUD', model: 'WUD', name: 'WUD', sw_version: 'unknown', }, icon: 'mdi:docker', entity_picture: 'https://github.com/getwud/wud/raw/main/docs/wud_logo.png',